Class: SonyCameraRemote::Discovery::Response

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

Instance Method Summary collapse

Constructor Details

#initialize(raw) ⇒ Response

Returns a new instance of Response.



4
5
6
7
8
9
10
# File 'lib/sony_camera_remote/discovery/response.rb', line 4

def initialize(raw)
  raw.each_line do |line|
    if match = line.match(/^LOCATION: (.*)/)
      @location, _ = match.captures
    end
  end
end

Instance Method Details

#locationObject



12
13
14
# File 'lib/sony_camera_remote/discovery/response.rb', line 12

def location
  @location
end