Class: SWD::Response

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Response

Returns a new instance of Response.



5
6
7
8
9
# File 'lib/swd/response.rb', line 5

def initialize(hash)
  @locations = hash[:locations]
  @location = @locations.first
  @raw = hash
end

Instance Attribute Details

#locationObject

Returns the value of attribute location.



3
4
5
# File 'lib/swd/response.rb', line 3

def location
  @location
end

#locationsObject

Returns the value of attribute locations.



3
4
5
# File 'lib/swd/response.rb', line 3

def locations
  @locations
end

#rawObject

Returns the value of attribute raw.



3
4
5
# File 'lib/swd/response.rb', line 3

def raw
  @raw
end