Sha256: 168a6f0793b7195917cddb1551c15d9a1ed5906ae742cb1c430b04aaba2f6856
Contents?: true
Size: 803 Bytes
Versions: 4
Compression:
Stored size: 803 Bytes
Contents
require 'simplexframe/errors' module Simplexframe class Page include PageObject def method_missing(m, *args, &blk) if @browser.respond_to? m @browser.send(m, *args, &blk) else super end #if end def turn_to kls raise InvalidSimplexframePageError unless kls <= Simplexframe::Page kls.new(@browser) end def data_driven hash, &blk raise ArgumentError unless hash.is_a?(Hash) hash.each do |mtd, data| m_with_eql = (mtd.to_s + '=').to_sym if respond_to?(m_with_eql) #self.send(m_with_eql, data) eval "self.#{m_with_eql.to_s}(data)" elsif respond_to?(mtd.to_sym) self.send(mtd.to_sym).send(data.to_sym) end #if end #each class_eval &blk if block_given? end end #Page end #Simplexframe
Version data entries
4 entries across 4 versions & 1 rubygems