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 |
# File 'lib/enummer/extension.rb', line 10 def enummer(values) = {} [:_prefix] = values.delete(:_prefix) [:_suffix] = values.delete(:_suffix) name, values = values.first attribute(name, :enummer, value_names: values) singleton_class.__send__(:define_method, name) { values } _enummer_build_with_scope(name, values) _enummer_build_values(name, values, ) end |