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