Class: SpreeCmCommissioner::Transit::TripStopForm
- Inherits:
-
Object
- Object
- SpreeCmCommissioner::Transit::TripStopForm
- Defined in:
- lib/spree_cm_commissioner/transit/trip_stop_form.rb
Instance Attribute Summary collapse
-
#allow_boarding ⇒ Object
Returns the value of attribute allow_boarding.
-
#allow_booking ⇒ Object
Returns the value of attribute allow_booking.
-
#allow_drop_off ⇒ Object
Returns the value of attribute allow_drop_off.
-
#allow_seat_selection ⇒ Object
Returns the value of attribute allow_seat_selection.
-
#board_to_trip_id ⇒ Object
Returns the value of attribute board_to_trip_id.
-
#departure_time ⇒ Object
Returns the value of attribute departure_time.
-
#duration_in_hours ⇒ Object
Returns the value of attribute duration_in_hours.
-
#location_id ⇒ Object
Returns the value of attribute location_id.
-
#route_type ⇒ Object
Returns the value of attribute route_type.
-
#sequence ⇒ Object
Returns the value of attribute sequence.
-
#stop_id ⇒ Object
Returns the value of attribute stop_id.
-
#vehicle_id ⇒ Object
Returns the value of attribute vehicle_id.
-
#vehicle_type_id ⇒ Object
Returns the value of attribute vehicle_type_id.
-
#vendor_id ⇒ Object
Returns the value of attribute vendor_id.
Instance Method Summary collapse
Instance Attribute Details
#allow_boarding ⇒ Object
Returns the value of attribute allow_boarding.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def allow_boarding @allow_boarding end |
#allow_booking ⇒ Object
Returns the value of attribute allow_booking.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def allow_booking @allow_booking end |
#allow_drop_off ⇒ Object
Returns the value of attribute allow_drop_off.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def allow_drop_off @allow_drop_off end |
#allow_seat_selection ⇒ Object
Returns the value of attribute allow_seat_selection.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def allow_seat_selection @allow_seat_selection end |
#board_to_trip_id ⇒ Object
Returns the value of attribute board_to_trip_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def board_to_trip_id @board_to_trip_id end |
#departure_time ⇒ Object
Returns the value of attribute departure_time.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def departure_time @departure_time end |
#duration_in_hours ⇒ Object
Returns the value of attribute duration_in_hours.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def duration_in_hours @duration_in_hours end |
#location_id ⇒ Object
Returns the value of attribute location_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def location_id @location_id end |
#route_type ⇒ Object
Returns the value of attribute route_type.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def route_type @route_type end |
#sequence ⇒ Object
Returns the value of attribute sequence.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def sequence @sequence end |
#stop_id ⇒ Object
Returns the value of attribute stop_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def stop_id @stop_id end |
#vehicle_id ⇒ Object
Returns the value of attribute vehicle_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def vehicle_id @vehicle_id end |
#vehicle_type_id ⇒ Object
Returns the value of attribute vehicle_type_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def vehicle_type_id @vehicle_type_id end |
#vendor_id ⇒ Object
Returns the value of attribute vendor_id.
3 4 5 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 3 def vendor_id @vendor_id end |
Instance Method Details
#allow_boarding? ⇒ Boolean
51 52 53 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 51 def allow_boarding? ActiveModel::Type::Boolean.new.cast(allow_boarding) end |
#duration_in_minutes ⇒ Object
55 56 57 58 59 |
# File 'lib/spree_cm_commissioner/transit/trip_stop_form.rb', line 55 def duration_in_minutes return nil if duration_in_hours.blank? (duration_in_hours.to_f * 60).to_i end |