Class: Nexty::Connector
- Inherits:
-
Object
- Object
- Nexty::Connector
- Defined in:
- lib/nexty/connector.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#nsc ⇒ Object
readonly
Returns the value of attribute nsc.
Instance Method Summary collapse
-
#initialize(file = "./conf/config.yaml") ⇒ Connector
constructor
A new instance of Connector.
Constructor Details
#initialize(file = "./conf/config.yaml") ⇒ Connector
Returns a new instance of Connector.
6 7 8 9 10 11 12 |
# File 'lib/nexty/connector.rb', line 6 def initialize(file="./conf/config.yaml") @config = Nexty::Config.instance.read(file) @nsc = Nexpose::Connection.new(@config["config"]["host"], @config["config"]["user"], @config["config"]["pass"], @config["config"]["port"]) end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
5 6 7 |
# File 'lib/nexty/connector.rb', line 5 def config @config end |
#nsc ⇒ Object (readonly)
Returns the value of attribute nsc.
5 6 7 |
# File 'lib/nexty/connector.rb', line 5 def nsc @nsc end |