module Gametel::Navigation

Module to facilitate create new gametel screen objects in definitions.

Public Instance Methods

on(cls, &block) click to toggle source

create a new screen given a class name

# File lib/gametel/navigation.rb, line 15
def on(cls, &block)
  @current_screen = @current_page = cls.new
  waiting_for  = "#{cls} to be active"
  wait_until(10, waiting_for) { @current_screen.active? } if @current_screen.respond_to?(:active?)
  block.call @current_screen if block
  @current_screen
end