Class: EnumIsh::Definer
- Inherits:
-
Object
- Object
- EnumIsh::Definer
- Defined in:
- lib/enum_ish/definer.rb
Direct Known Subclasses
Instance Method Summary collapse
- #define(enum) ⇒ Object
-
#initialize(klass) ⇒ Definer
constructor
A new instance of Definer.
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 |