Module: SSM::ClassMethods
- Defined in:
- lib/ssm/ssm.rb
Instance Method Summary collapse
Instance Method Details
#state_validation(*states, &block) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/ssm/ssm.rb', line 14 def state_validation(*states, &block) states.each do |state| is_state = (state.to_s + "?").to_sym if: is_state do |resource| yield resource end end end |
#states(*_states) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/ssm/ssm.rb', line 7 def states(*_states) _states.each do |state| define_state_boolean(state) define_state_scope(state) end end |