Class: AgentX::Console
- Inherits:
-
Object
- Object
- AgentX::Console
- Defined in:
- lib/agentx/console.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Console
constructor
A new instance of Console.
- #load_config ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Console
Returns a new instance of Console.
6 7 8 |
# File 'lib/agentx/console.rb', line 6 def initialize(={}) = end |
Instance Attribute Details
#options ⇒ Object (readonly)
Returns the value of attribute options.
4 5 6 |
# File 'lib/agentx/console.rb', line 4 def end |
Class Method Details
.load(filename) ⇒ Object
25 26 27 |
# File 'lib/agentx/console.rb', line 25 def self.load(filename) class_eval(File.read(filename)) end |
Instance Method Details
#load_config ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/agentx/console.rb', line 10 def load_config unless [:config] [:config] = "#{AgentX.root}/config" unless File.exists?([:config]) example = File.('../../config.example', File.dirname(__FILE__)) FileUtils.cp(example, [:config]) FileUtils.chmod(0600, [:config]) end end self.class.load([:config]) end |