Class: Travis::Model
- Inherits:
-
Object
- Object
- Travis::Model
- Defined in:
- lib/travis/model.rb
Instance Attribute Summary collapse
-
#record ⇒ Object
readonly
Returns the value of attribute record.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(record) ⇒ Model
constructor
A new instance of Model.
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
#record ⇒ Object (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 |