Class: SpreeCmCommissioner::TripQueryResult
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::TripQueryResult
- Defined in:
- lib/spree_cm_commissioner/trip_query_result.rb
Instance Attribute Summary collapse
-
#connection_id ⇒ Object
readonly
Returns the value of attribute connection_id.
-
#trips ⇒ Object
readonly
Returns the value of attribute trips.
Instance Method Summary collapse
- #direct? ⇒ Boolean
-
#initialize(trips, connection_id: nil) ⇒ TripQueryResult
constructor
A new instance of TripQueryResult.
Constructor Details
#initialize(trips, connection_id: nil) ⇒ TripQueryResult
Returns a new instance of TripQueryResult.
5 6 7 8 |
# File 'lib/spree_cm_commissioner/trip_query_result.rb', line 5 def initialize(trips, connection_id: nil) @trips = Array(trips) @connection_id = connection_id end |
Instance Attribute Details
#connection_id ⇒ Object (readonly)
Returns the value of attribute connection_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/trip_query_result.rb', line 3 def connection_id @connection_id end |
#trips ⇒ Object (readonly)
Returns the value of attribute trips.
3 4 5 |
# File 'lib/spree_cm_commissioner/trip_query_result.rb', line 3 def trips @trips end |
Instance Method Details
#direct? ⇒ Boolean
10 11 12 |
# File 'lib/spree_cm_commissioner/trip_query_result.rb', line 10 def direct? @trips.size == 1 end |