Class: Netscaler::Service::Response
- Inherits:
-
Object
- Object
- Netscaler::Service::Response
- Defined in:
- lib/netscaler/service/response.rb
Instance Method Summary collapse
-
#initialize(raw_response) ⇒ Response
constructor
A new instance of Response.
- #ip_address ⇒ Object
- #name ⇒ Object
- #port ⇒ Object
- #server ⇒ Object
- #state ⇒ Object
- #to_hash ⇒ Object
Constructor Details
#initialize(raw_response) ⇒ Response
Returns a new instance of Response.
3 4 5 |
# File 'lib/netscaler/service/response.rb', line 3 def initialize(raw_response) @info = raw_response[:return][:list][:item] end |
Instance Method Details
#ip_address ⇒ Object
11 12 13 |
# File 'lib/netscaler/service/response.rb', line 11 def ip_address @info[:ipaddress] end |
#name ⇒ Object
7 8 9 |
# File 'lib/netscaler/service/response.rb', line 7 def name @info[:name] end |
#port ⇒ Object
19 20 21 |
# File 'lib/netscaler/service/response.rb', line 19 def port @info[:port].to_i end |
#server ⇒ Object
23 24 25 |
# File 'lib/netscaler/service/response.rb', line 23 def server @info[:servername] end |
#state ⇒ Object
15 16 17 |
# File 'lib/netscaler/service/response.rb', line 15 def state @info[:svrstate] end |
#to_hash ⇒ Object
27 28 29 30 31 32 33 34 |
# File 'lib/netscaler/service/response.rb', line 27 def to_hash { :name => name, :server => server, :ip_address => ip_address, :state => state, :port => port } end |