Class: Ellington::Ticket
- Inherits:
-
SimpleDelegator
- Object
- SimpleDelegator
- Ellington::Ticket
- Defined in:
- lib/ellington/ticket.rb
Instance Attribute Summary collapse
-
#goal ⇒ Object
readonly
Returns the value of attribute goal.
-
#passenger ⇒ Object
readonly
Returns the value of attribute passenger.
Instance Method Summary collapse
- #id ⇒ Object
-
#initialize(goal = nil, hash = {}) ⇒ Ticket
constructor
A new instance of Ticket.
Constructor Details
Instance Attribute Details
#goal ⇒ Object (readonly)
Returns the value of attribute goal.
7 8 9 |
# File 'lib/ellington/ticket.rb', line 7 def goal @goal end |
#passenger ⇒ Object (readonly)
Returns the value of attribute passenger.
7 8 9 |
# File 'lib/ellington/ticket.rb', line 7 def passenger @passenger end |
Instance Method Details
#id ⇒ Object
15 16 17 |
# File 'lib/ellington/ticket.rb', line 15 def id Digest::SHA256.hexdigest values.map(&:to_s).join end |