Sha256: e90e736fa5bb1fa5912a02b55fc5d8a0fa19280060c74f04c9ed740ab544fec4
Contents?: true
Size: 452 Bytes
Versions: 10
Compression:
Stored size: 452 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_method :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
10 entries across 10 versions & 1 rubygems