Module: QcMetric::QcState
- Included in:
- QcMetric
- Defined in:
- app/models/qc_metric/qc_state.rb
Defined Under Namespace
Classes: State
Instance Method Summary collapse
- #new_state(name, options = {}) ⇒ Object
- #qc_state_object_called(name) ⇒ Object
- #valid_states ⇒ Object
Instance Method Details
#new_state(name, options = {}) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'app/models/qc_metric/qc_state.rb', line 5 def new_state(name, = {}) @states ||= {} @states[name] = State.new( name, .fetch(:automatic, true), .fetch(:passed, true), .fetch(:proceedable, true) ) end |
#qc_state_object_called(name) ⇒ Object
19 20 21 |
# File 'app/models/qc_metric/qc_state.rb', line 19 def qc_state_object_called(name) @states[name] end |
#valid_states ⇒ Object
15 16 17 |
# File 'app/models/qc_metric/qc_state.rb', line 15 def valid_states @states.keys end |