Sha256: 8436252820498edc9e535f636d9e26577a4b7e90deb1fb8b8e488f62ea1ae523
Contents?: true
Size: 443 Bytes
Versions: 1
Compression:
Stored size: 443 Bytes
Contents
module AppPrism module ScreenFactory def on_page(page_class, *args) page_class = class_from_string(page_class) if page_class.is_a? String @current_screen = page_class.new(@browser) end alias :on on_page def class_from_string(class_name) parts = class_name.split("::") constant = Object parts.each do |part| constant = constant.const_get(part) end constant end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
app_prism-0.0.7 | lib/app_prism/screen_factory.rb |