Module: Oshpark::Stateful
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 |
# File 'lib/oshpark/stateful.rb', line 3 def self.included base base.const_get(:STATES).each do |_state| define_method "#{_state.downcase}?" do state == _state end end end |