Module: Enummer::Extension
- Defined in:
- lib/enummer/extension.rb
Instance Method Summary collapse
Instance Method Details
#enummer(values) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/enummer/extension.rb', line 10 def enummer(values) = {} [:_prefix] = values.delete(:_prefix) [:_suffix] = values.delete(:_suffix) name, values = values.first values = _enummer_determine_bit_pairs(values) attribute(name, :enummer, values: values) singleton_class.__send__(:define_method, name) { values.keys } _enummer_build_with_scope(name, values) _enummer_build_values(name, values, ) end |