Class: ICuke::Configuration

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

Instance Method Summary collapse

Constructor Details

#initialize(defaults = {}) ⇒ Configuration

Returns a new instance of Configuration.



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

def initialize(defaults = {})
  @data = defaults
end

Instance Method Details

#[](key) ⇒ Object



15
16
17
# File 'lib/icuke/configuration.rb', line 15

def [](key)
  get(key)
end

#get(key) ⇒ Object



11
12
13
# File 'lib/icuke/configuration.rb', line 11

def get(key)
  @data[key]
end

#set(key, value) ⇒ Object



7
8
9
# File 'lib/icuke/configuration.rb', line 7

def set(key, value)
  @data[key] = value
end