class Durian::Page
Public Instance Methods
[](key)
click to toggle source
Call page objects and elements with the page.click syntax
# File lib/durian/page.rb, line 15 def [](key) send(key) end
for(name)
click to toggle source
# File lib/durian/page.rb, line 19 def for(name) page = "#{name}Page".classify page.constantize rescue raise "Could not find page #{page}" end
inherited(base)
click to toggle source
Allows Page
Object class’s to inherit from Durian::Page
class
# File lib/durian/page.rb, line 10 def inherited(base) base.instance_variable_set :@elements, Hash.new { |hash, key, value| hash[key] = [] } end