Class: ForestRails::Collection
- Inherits:
-
Object
- Object
- ForestRails::Collection
- Extended by:
- ActiveModel::Naming
- Includes:
- ActiveModel::Conversion, ActiveModel::Serialization, ActiveModel::Validations
- Defined in:
- app/models/forest_rails/collection.rb
Instance Attribute Summary collapse
-
#fields ⇒ Object
Returns the value of attribute fields.
-
#name ⇒ Object
Returns the value of attribute name.
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.
11 12 13 14 15 |
# File 'app/models/forest_rails/collection.rb', line 11 def initialize(attributes = {}) attributes.each do |name, value| send("#{name}=", value) end end |
Instance Attribute Details
#fields ⇒ Object
Returns the value of attribute fields.
9 10 11 |
# File 'app/models/forest_rails/collection.rb', line 9 def fields @fields end |
#name ⇒ Object
Returns the value of attribute name.
9 10 11 |
# File 'app/models/forest_rails/collection.rb', line 9 def name @name end |
Instance Method Details
#id ⇒ Object
21 22 23 |
# File 'app/models/forest_rails/collection.rb', line 21 def id name end |
#persisted? ⇒ Boolean
17 18 19 |
# File 'app/models/forest_rails/collection.rb', line 17 def persisted? false end |