Module: Oshpark::Stateful

Included in:
Import, Order, OrderItem, Panel, Project, Upload
Defined in:
lib/oshpark/stateful.rb

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