Class: Appdynamics::Node
- Inherits:
-
Object
- Object
- Appdynamics::Node
- Defined in:
- lib/appdynamics/node.rb
Constant Summary collapse
- ATTRIBUTES =
[:id, :name, :type, :tierId, :tierName, :machineId, :machineName, :machineOSType, :ipAddresses, :machineAgentPresent, :machineAgentVersion, :appAgentPresent, :appAgentVersion, :nodeUniqueLocalId]
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(controller, application, attrs) ⇒ Node
constructor
A new instance of Node.
- #relative_route(*_) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(controller, application, attrs) ⇒ Node
Returns a new instance of Node.
9 10 11 12 13 14 15 |
# File 'lib/appdynamics/node.rb', line 9 def initialize controller, application, attrs @controller = controller @application = application attrs.keys.each do |key| self.send "#{key}=", attrs[key] end end |
Class Method Details
Instance Method Details
#relative_route(*_) ⇒ Object
28 29 30 |
# File 'lib/appdynamics/node.rb', line 28 def relative_route *_ "#{application.relative_route}/nodes/#{id}" end |
#to_hash ⇒ Object
17 18 19 20 21 22 |
# File 'lib/appdynamics/node.rb', line 17 def to_hash ATTRIBUTES.inject({}){|hsh, attr| hsh[attr] = self.send(attr) hsh } end |