Class: EasyRecord
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(args = nil) ⇒ EasyRecord
constructor
private.
Methods included from Association
Constructor Details
#initialize(args = nil) ⇒ EasyRecord
private
24 25 26 27 |
# File 'lib/easy_record.rb', line 24 def initialize(args = nil) Record.track(self) @id = Index.next_id(self) end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
8 9 10 |
# File 'lib/easy_record.rb', line 8 def id @id end |
Class Method Details
.first ⇒ Object
14 15 16 |
# File 'lib/easy_record.rb', line 14 def self.first self.all.first end |
.last ⇒ Object
18 19 20 |
# File 'lib/easy_record.rb', line 18 def self.last self.all.last end |