Class: EventHub::Configuration

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/eventhub/configuration.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
# File 'lib/eventhub/configuration.rb', line 8

def initialize
 	@data = nil
end

Instance Attribute Details

#dataObject

Returns the value of attribute data.



6
7
8
# File 'lib/eventhub/configuration.rb', line 6

def data
  @data
end

Instance Method Details

#load_file(input, env = 'development') ⇒ Object



12
13
14
15
# File 'lib/eventhub/configuration.rb', line 12

def load_file(input, env='development')
 	tmp = JSON.parse( IO.read(input))
	@data = tmp[env]
end