Class: BookingState
- Inherits:
-
Object
- Object
- BookingState
- Defined in:
- app/models/booking_state.rb
Overview
Instance Attribute Summary (collapse)
-
- (String) label
The label that describes the BookingState.
Instance Method Summary (collapse)
-
- (Boolean) accept(booking)
If the Booking is in the
pendingstate, transition it to theacceptedstate. -
- (Boolean) cancel(booking)
If the Booking is in the
pending,acceptedorrejectedstates, transition it to thecancelledstate. -
- (Boolean) reject(booking)
If the Booking is in the
pendingstate, transition it to therejectedstate.
Instance Attribute Details
- (String) label
Returns the label that describes the BookingState.
12 13 14 |
# File 'app/models/booking_state.rb', line 12 def label @label end |
Instance Method Details
- (Boolean) accept(booking)
23 24 |
# File 'app/models/booking_state.rb', line 23 def accept booking end |
- (Boolean) cancel(booking)
45 46 |
# File 'app/models/booking_state.rb', line 45 def cancel booking end |