Class: Travis::Model

Inherits:
Object
  • Object
show all
Defined in:
lib/travis/model.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(record) ⇒ Model

Returns a new instance of Model.



22
23
24
# File 'lib/travis/model.rb', line 22

def initialize(record)
  @record = record
end

Instance Attribute Details

#recordObject (readonly)

Returns the value of attribute record.



20
21
22
# File 'lib/travis/model.rb', line 20

def record
  @record
end

Class Method Details

.find(id) ⇒ Object



13
14
15
# File 'lib/travis/model.rb', line 13

def find(id)
  new(self.class.name.demodulize.constantize.find(id))
end