Class: EnumIsh::Definer

Inherits:
Object
  • Object
show all
Defined in:
lib/enum_ish/definer.rb

Direct Known Subclasses

ActiveRecordDefiner

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Definer

Returns a new instance of Definer.



5
6
7
# File 'lib/enum_ish/definer.rb', line 5

def initialize(klass)
  @klass = klass
end

Instance Method Details

#define(enum) ⇒ Object



9
10
11
12
13
# File 'lib/enum_ish/definer.rb', line 9

def define(enum)
  enum.features.each do |feature|
    send("define_#{feature}", enum)
  end
end