Class: Netscaler::Server::ServiceGroupInfo
- Inherits:
-
Object
- Object
- Netscaler::Server::ServiceGroupInfo
- Defined in:
- lib/netscaler/server/response.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#state ⇒ Object
readonly
Returns the value of attribute state.
Instance Method Summary collapse
-
#initialize(raw_response, index) ⇒ ServiceGroupInfo
constructor
A new instance of ServiceGroupInfo.
- #to_hash ⇒ Object
Constructor Details
#initialize(raw_response, index) ⇒ ServiceGroupInfo
Returns a new instance of ServiceGroupInfo.
98 99 100 101 102 103 104 105 106 |
# File 'lib/netscaler/server/response.rb', line 98 def initialize(raw_response, index) @name = raw_response[:servicegroupname][:item] @state = raw_response[:boundservicegroupsvrstate][:item] if !index.nil? @name = @name[index] @state = @state[index] end end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
96 97 98 |
# File 'lib/netscaler/server/response.rb', line 96 def name @name end |
#state ⇒ Object (readonly)
Returns the value of attribute state.
96 97 98 |
# File 'lib/netscaler/server/response.rb', line 96 def state @state end |
Instance Method Details
#to_hash ⇒ Object
108 109 110 111 112 |
# File 'lib/netscaler/server/response.rb', line 108 def to_hash { :name => name, :state => state } end |