Sha256: 85a8aeb5c14cd84371eca6cfaf4296d3870fd685c45dff5c67c5a21fef1ed839
Contents?: true
Size: 557 Bytes
Versions: 10
Compression:
Stored size: 557 Bytes
Contents
module EnumIsh class Config @@options = { text_prefix: '', text_suffix: '_text', options_prefix: '', options_suffix: '_options', raw_prefix: '', raw_suffix: '_raw', scope_prefix: 'with_', scope_suffix: '' } @@options.keys.each do |key| define_singleton_method "#{key}" do @@options[key] end define_singleton_method "#{key}=" do |val| @@options[key] = val end end class << self def configure yield self end end end end
Version data entries
10 entries across 10 versions & 1 rubygems