Class: Utusemi::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/utusemi/configuration.rb

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



3
4
5
# File 'lib/utusemi/configuration.rb', line 3

def initialize
  @maps ||= {}
end

Instance Method Details

#map(name, *args, &block) ⇒ Object



7
8
9
10
11
12
# File 'lib/utusemi/configuration.rb', line 7

def map(name, *args, &block)
  name = (name || '').to_sym
  return map_get(name, *args) unless block_given?
  options = args.shift if args.first.is_a? Hash
  map_set(name, options, &block)
end