Class: Yournavigation::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/yournavigation/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(fpoint, tpoint, opts = {}) ⇒ Client

Returns a new instance of Client.



14
15
16
17
18
# File 'lib/yournavigation/client.rb', line 14

def initialize fpoint, tpoint, opts={}
  @fpoint = fpoint
  @tpoint = tpoint
  @options = default_options.merge opts
end

Instance Attribute Details

#fpointObject (readonly)

Returns the value of attribute fpoint.



12
13
14
# File 'lib/yournavigation/client.rb', line 12

def fpoint
  @fpoint
end

#optionsObject (readonly)

Returns the value of attribute options.



12
13
14
# File 'lib/yournavigation/client.rb', line 12

def options
  @options
end

#tpointObject (readonly)

Returns the value of attribute tpoint.



12
13
14
# File 'lib/yournavigation/client.rb', line 12

def tpoint
  @tpoint
end

Instance Method Details

#gosmoreObject



20
21
22
23
24
25
26
# File 'lib/yournavigation/client.rb', line 20

def gosmore
  if empty_points?
    GosmoreItem.new
  else
    parsed_response
  end
end