Class: Netscaler::Server::ServiceGroupInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/netscaler/server/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



96
97
98
# File 'lib/netscaler/server/response.rb', line 96

def name
  @name
end

#stateObject (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_hashObject



108
109
110
111
112
# File 'lib/netscaler/server/response.rb', line 108

def to_hash
  { :name => name,
    :state => state
  }
end