Module: BaseUrl
- Defined in:
- lib/browser-instance.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.extended(target) ⇒ Object
42 43 44 45 46 47 48 |
# File 'lib/browser-instance.rb', line 42 def self.extended(target) super class << target alias_method :to_absolute, :to alias_method :to, :to_relative end end |
Instance Method Details
#base_url=(base) ⇒ Object
54 55 56 |
# File 'lib/browser-instance.rb', line 54 def base_url=(base) @base_url = base end |
#to_relative(new_location) ⇒ Object
50 51 52 |
# File 'lib/browser-instance.rb', line 50 def to_relative(new_location) to_absolute(@base_url + new_location) end |