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
pending
state, transition it to theaccepted
state. -
- (Boolean) cancel(booking)
If the Booking is in the
pending
,accepted
orrejected
states, transition it to thecancelled
state. -
- (Boolean) reject(booking)
If the Booking is in the
pending
state, transition it to therejected
state.
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 |