Class: ForestLiana::Model::Segment

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Naming
Includes:
ActiveModel::Conversion, ActiveModel::Serialization, ActiveModel::Validations
Defined in:
app/models/forest_liana/model/segment.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#idObject

Returns the value of attribute id.


7
8
9
# File 'app/models/forest_liana/model/segment.rb', line 7

def id
  @id
end

#nameObject

Returns the value of attribute name.


7
8
9
# File 'app/models/forest_liana/model/segment.rb', line 7

def name
  @name
end

#scopeObject

Returns the value of attribute scope.


7
8
9
# File 'app/models/forest_liana/model/segment.rb', line 7

def scope
  @scope
end

#whereObject

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

Returns:

  • (Boolean)

17
18
19
# File 'app/models/forest_liana/model/segment.rb', line 17

def persisted?
  false
end