Sha256: 8b6d49c304ac51e9fdd74272e0475b25e3ee1d5e093f4a698bd2077f9b3f0a73
Contents?: true
Size: 1.04 KB
Versions: 2
Compression:
Stored size: 1.04 KB
Contents
module WatirSplash module Page class Base include SpecHelper class << self @@url = "about:blank" def url url @@url = url end end def initialize(browser=nil) if browser @browser = WatirSplash::Util.formatter.browser = browser else @browser = WatirSplash::Browser.new @browser.goto @@url end end def return_for element, methodz methodz.each_pair do |meth, return_value| element.instance_eval do instance_variable_set("@#{meth}_return_value", return_value) instance_eval %Q[ self.class.send(:alias_method, :__#{meth}, :#{meth}) if respond_to? :#{meth} def #{meth}(*args) self.send(:__#{meth}, *args) if respond_to? :__#{meth} instance_variable_get("@#{meth}_return_value").call(*args) end ] end end element end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
watirsplash-2.0.0.rc2 | lib/watirsplash/page/base.rb |
watirsplash-2.0.0.rc1 | lib/watirsplash/page/base.rb |