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