Class: Appdynamics::Tier
- Inherits:
-
Object
- Object
- Appdynamics::Tier
- Defined in:
- lib/appdynamics/tier.rb
Constant Summary collapse
- ATTRIBUTES =
[:id, :agentType, :description, :name, :numberOfNodes, :type]
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#controller ⇒ Object
Returns the value of attribute controller.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(controller, application, attrs) ⇒ Tier
constructor
A new instance of Tier.
- #relative_route(*_) ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(controller, application, attrs) ⇒ Tier
Returns a new instance of Tier.
8 9 10 11 12 13 14 |
# File 'lib/appdynamics/tier.rb', line 8 def initialize controller, application, attrs @application = application @controller = controller attrs.keys.each do |key| self.send "#{key}=", attrs[key] end end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
6 7 8 |
# File 'lib/appdynamics/tier.rb', line 6 def application @application end |
#controller ⇒ Object
Returns the value of attribute controller.
6 7 8 |
# File 'lib/appdynamics/tier.rb', line 6 def controller @controller end |
Class Method Details
Instance Method Details
#relative_route(*_) ⇒ Object
27 28 29 |
# File 'lib/appdynamics/tier.rb', line 27 def relative_route *_ "#{application.relative_route}/tiers/#{id}" end |
#to_hash ⇒ Object
16 17 18 19 20 21 |
# File 'lib/appdynamics/tier.rb', line 16 def to_hash ATTRIBUTES.inject({}){|hsh, attr| hsh[attr] = self.send(attr) hsh } end |