Class: Evoc::Tx
Instance Attribute Summary collapse
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#index ⇒ Object
Returns the value of attribute index.
-
#items ⇒ Object
Returns the value of attribute items.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(index: nil, id:, date: nil, items:) ⇒ Tx
constructor
A new instance of Tx.
- #size ⇒ Object
- #to_a ⇒ Object
- #to_i ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(index: nil, id:, date: nil, items:) ⇒ Tx
Returns a new instance of Tx.
7 8 9 10 11 12 |
# File 'lib/evoc/tx.rb', line 7 def initialize(index: nil,id:,date: nil,items:) @index = index @id = id @date = date @items = items end |
Instance Attribute Details
#date ⇒ Object (readonly)
Returns the value of attribute date.
4 5 6 |
# File 'lib/evoc/tx.rb', line 4 def date @date end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
4 5 6 |
# File 'lib/evoc/tx.rb', line 4 def id @id end |
#index ⇒ Object
Returns the value of attribute index.
5 6 7 |
# File 'lib/evoc/tx.rb', line 5 def index @index end |
#items ⇒ Object
Returns the value of attribute items.
5 6 7 |
# File 'lib/evoc/tx.rb', line 5 def items @items end |
Instance Method Details
#<=>(other) ⇒ Object
18 19 20 |
# File 'lib/evoc/tx.rb', line 18 def <=> other self.index <=> other.index end |
#size ⇒ Object
14 15 16 |
# File 'lib/evoc/tx.rb', line 14 def size self.items.size end |
#to_a ⇒ Object
30 31 32 |
# File 'lib/evoc/tx.rb', line 30 def to_a self.items.to_a end |
#to_i ⇒ Object
22 23 24 |
# File 'lib/evoc/tx.rb', line 22 def to_i self.index.to_i end |
#to_s ⇒ Object
26 27 28 |
# File 'lib/evoc/tx.rb', line 26 def to_s self.id.to_s end |