module Symbiote::Factory
Public Instance Methods
on(definition, visit = false) { |context| ... }
click to toggle source
Creates a definition context for actions. If an existing context exists, that context will be re-used.
# File lib/symbiote/factory.rb, line 5 def on(definition, visit = false, &block) unless @context.is_a?(definition) @context = definition.new(@browser) if @browser @context = definition.new unless @browser @context.visit if visit end yield @context if block @context end
on_view(definition, &block)
click to toggle source
Creates a definition context for actions and establishes the context for execution.
# File lib/symbiote/factory.rb, line 18 def on_view(definition, &block) on(definition, true, &block) end
Also aliased as: on_visit