Class: ForestLiana::Model::Collection
- Inherits:
-
Object
- Object
- ForestLiana::Model::Collection
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Serialization, ActiveModel::Validations
- Defined in:
- app/models/forest_liana/model/collection.rb
Instance Attribute Summary collapse
-
#actions ⇒ Object
Returns the value of attribute actions.
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#is_read_only ⇒ Object
Returns the value of attribute is_read_only.
-
#is_searchable ⇒ Object
Returns the value of attribute is_searchable.
-
#is_virtual ⇒ Object
Returns the value of attribute is_virtual.
-
#name ⇒ Object
Returns the value of attribute name.
-
#only_for_relationships ⇒ Object
Returns the value of attribute only_for_relationships.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(attributes = {}) ⇒ Collection
constructor
A new instance of Collection.
- #persisted? ⇒ Boolean
Constructor Details
#initialize(attributes = {}) ⇒ Collection
Returns a new instance of Collection.
10 11 12 13 14 15 16 17 |
# File 'app/models/forest_liana/model/collection.rb', line 10 def initialize(attributes = {}) @actions = [] @is_searchable = true attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#actions ⇒ Object
Returns the value of attribute actions.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def actions @actions end |
#fields ⇒ Object
Returns the value of attribute fields.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def fields @fields end |
#is_read_only ⇒ Object
Returns the value of attribute is_read_only.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def is_read_only @is_read_only end |
#is_searchable ⇒ Object
Returns the value of attribute is_searchable.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def is_searchable @is_searchable end |
#is_virtual ⇒ Object
Returns the value of attribute is_virtual.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def is_virtual @is_virtual end |
#name ⇒ Object
Returns the value of attribute name.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def name @name end |
#only_for_relationships ⇒ Object
Returns the value of attribute only_for_relationships.
7 8 9 |
# File 'app/models/forest_liana/model/collection.rb', line 7 def only_for_relationships @only_for_relationships end |
Instance Method Details
#id ⇒ Object
23 24 25 |
# File 'app/models/forest_liana/model/collection.rb', line 23 def id name end |
#persisted? ⇒ Boolean
19 20 21 |
# File 'app/models/forest_liana/model/collection.rb', line 19 def persisted? false end |