Class: Record
- Inherits:
-
Object
- Object
- Record
- Defined in:
- lib/fixture_background/ivars.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Class Method Summary collapse
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(id) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(id) ⇒ Record
Returns a new instance of Record.
56 57 58 |
# File 'lib/fixture_background/ivars.rb', line 56 def initialize(id) @id = id.to_i end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
48 49 50 |
# File 'lib/fixture_background/ivars.rb', line 48 def id @id end |
Class Method Details
.find(id) ⇒ Object
51 52 53 |
# File 'lib/fixture_background/ivars.rb', line 51 def find(id) new(id) end |
Instance Method Details
#==(other) ⇒ Object
60 61 62 |
# File 'lib/fixture_background/ivars.rb', line 60 def ==(other) other.class == Record && other.id == id end |