Class: Smith::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/smith/config.rb

Constant Summary collapse

CONFIG_FILENAME =
'.smithrc'

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



43
44
45
# File 'lib/smith/config.rb', line 43

def initialize
  load_config
end

Instance Attribute Details

#agencyObject

Returns the value of attribute agency.



14
15
16
# File 'lib/smith/config.rb', line 14

def agency
  @agency
end

#agentObject

Returns the value of attribute agent.



14
15
16
# File 'lib/smith/config.rb', line 14

def agent
  @agent
end

#amqpObject

Returns the value of attribute amqp.



14
15
16
# File 'lib/smith/config.rb', line 14

def amqp
  @amqp
end

#eventmachineObject

Returns the value of attribute eventmachine.



14
15
16
# File 'lib/smith/config.rb', line 14

def eventmachine
  @eventmachine
end

#loggingObject

Returns the value of attribute logging.



14
15
16
# File 'lib/smith/config.rb', line 14

def logging
  @logging
end

#rubyObject

Returns the value of attribute ruby.



14
15
16
# File 'lib/smith/config.rb', line 14

def ruby
  @ruby
end

#smithObject

Returns the value of attribute smith.



14
15
16
# File 'lib/smith/config.rb', line 14

def smith
  @smith
end

Class Method Details

.getObject



59
60
61
# File 'lib/smith/config.rb', line 59

def self.get
  @config ||= Config.new
end

Instance Method Details

#pathObject



55
56
57
# File 'lib/smith/config.rb', line 55

def path
  @config_file
end

#reloadObject



47
48
49
# File 'lib/smith/config.rb', line 47

def reload
  @config = Config.new
end

#to_hashObject



51
52
53
# File 'lib/smith/config.rb', line 51

def to_hash
  {:agent => @agent, :agency => @agency, :amqp => @amqp, :eventmachine => @eventmachine, :logging => @logging, :smith => @smith, :ruby => @ruby}
end