Class: LinkedRails::Form::Page
- Defined in:
- app/models/linked_rails/form/page.rb
Constant Summary
Constants included from Model::Collections
Model::Collections::COLLECTION_CUSTOMIZABLE_OPTIONS, Model::Collections::COLLECTION_OPTIONS, Model::Collections::COLLECTION_STATIC_OPTIONS
Instance Attribute Summary collapse
-
#description ⇒ Object
Returns the value of attribute description.
-
#groups ⇒ Object
Returns the value of attribute groups.
-
#key ⇒ Object
writeonly
Sets the attribute key.
-
#label ⇒ Object
Returns the value of attribute label.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
- #add_group(**opts) ⇒ Object
- #footer_group ⇒ Object
- #footer_group! ⇒ Object
-
#initialize(**attrs) ⇒ Page
constructor
A new instance of Page.
Methods inherited from Resource
Methods included from Model
Methods included from Model::Singularable
#root_relative_iri, #root_relative_singular_iri, #singular_iri, #singular_iri?, #singular_iri_opts, #singular_iri_template, #singular_resource?
Methods included from Model::Serialization
#preview_includes, #show_includes
Methods included from Model::Menuable
Methods included from Model::IRI
#anonymous_iri, #anonymous_iri?, #iri, #iri_elements, #iri_opts, #rdf_type, #reload, #root_relative_iri, #route_fragment
Methods included from Model::Enhancements
Methods included from Model::Dirty
Methods included from Model::Collections
#collection_for, #collection_iri, #collection_options_for, #collection_root_relative_iri, #parent_collections
Methods included from Model::Actionable
#action, #action_list, #action_triples, #actions, #collection_actions, #favorite_actions
Constructor Details
#initialize(**attrs) ⇒ Page
Returns a new instance of Page.
9 10 11 12 |
# File 'app/models/linked_rails/form/page.rb', line 9 def initialize(**attrs) super(**attrs) self.groups = [] end |
Instance Attribute Details
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'app/models/linked_rails/form/page.rb', line 6 def description @description end |
#groups ⇒ Object
Returns the value of attribute groups.
6 7 8 |
# File 'app/models/linked_rails/form/page.rb', line 6 def groups @groups end |
#key=(value) ⇒ Object (writeonly)
Sets the attribute key
7 8 9 |
# File 'app/models/linked_rails/form/page.rb', line 7 def key=(value) @key = value end |
#label ⇒ Object
Returns the value of attribute label.
6 7 8 |
# File 'app/models/linked_rails/form/page.rb', line 6 def label @label end |
Class Method Details
.iri ⇒ Object
29 30 31 |
# File 'app/models/linked_rails/form/page.rb', line 29 def iri Vocab.form[:Page] end |
Instance Method Details
#add_group(**opts) ⇒ Object
14 15 16 17 18 |
# File 'app/models/linked_rails/form/page.rb', line 14 def add_group(**opts) group = Form::Group.new(**opts) groups << group group end |
#footer_group ⇒ Object
20 21 22 |
# File 'app/models/linked_rails/form/page.rb', line 20 def @footer_group ||= add_group(collapsible: false, footer: true, key: :footer) end |
#footer_group! ⇒ Object
24 25 26 |
# File 'app/models/linked_rails/form/page.rb', line 24 def @footer_group end |