Module: Glib::EnumHelper
- Defined in:
- app/helpers/glib/enum_helper.rb
Instance Method Summary collapse
Instance Method Details
#glib_enum_options(clazz, enum_field, keys = nil) ⇒ Object
3 4 5 6 |
# File 'app/helpers/glib/enum_helper.rb', line 3 def (clazz, enum_field, keys = nil) keys ||= clazz.send("#{enum_field}s").keys keys.map { |i| { text: clazz.glib_enum_humanize(enum_field, i), value: i } } end |