Class: Horseman::Browser::Location

Inherits:
Object
  • Object
show all
Defined in:
lib/horseman/browser/location.rb

Instance Method Summary collapse

Constructor Details

#initialize(window) ⇒ Location

Returns a new instance of Location.



4
5
6
# File 'lib/horseman/browser/location.rb', line 4

def initialize(window)
	@window = window
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *arguments, &block) ⇒ Object



17
18
19
# File 'lib/horseman/browser/location.rb', line 17

def method_missing(method, *arguments, &block)
  puts "Not implemented in Location: #{method} #{arguments.join(',')}"
end

Instance Method Details

#href=(value) ⇒ Object



8
9
10
11
# File 'lib/horseman/browser/location.rb', line 8

def href=(value)
	@window.browser.get! value, :no_base_url=>true
	# TODO - Can we stop executing javascript here?
end

#respond_to?(method_sym, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/horseman/browser/location.rb', line 13

def respond_to?(method_sym, include_private = false)
  true
end