class RUTL::Interface::Null

Interface-level code for fake application.

Attributes

current_view[W]

The null driver needs to talk to the null interface. Other driver/interface relations are not like this.

Public Class Methods

new() click to toggle source
Calls superclass method RUTL::Interface::Browser::new
# File lib/rutl/interface/browser/null.rb, line 9
def initialize
  context = RUTL::Element::ElementContext.new(destinations: nil,
                                              interface: self,
                                              selectors: [])
  @driver = NullDriver.new(context)
  super
end

Public Instance Methods

current_view() click to toggle source
# File lib/rutl/interface/browser/null.rb, line 21
def current_view
  # Default to @view.first if not set?
  # An application can always check its current URL but
  # the null driver can't.
  @current_view ||= @views.first
end
wait_for_transition(destinations) click to toggle source
# File lib/rutl/interface/browser/null.rb, line 28
def wait_for_transition(destinations)
  # TODO: Setting @current view didn't do it beacause that set
  # context.interface.current_view and we wanted this in the application.
  @current_view = destinations.first.new(self)
  $application.current_view = @current_view
end