Sha256: 2dac54692943f0de8638769867f10185d665f6456f951a4adfb3343f3f5aa65c
Contents?: true
Size: 650 Bytes
Versions: 1
Compression:
Stored size: 650 Bytes
Contents
module Symbiote module Factory # Creates a definition context for actions. If an existing context # exists, that context will be re-used. 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 # Creates a definition context for actions and establishes the # context for execution. def on_view(definition, &block) on(definition, true, &block) end alias on_visit on_view end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
symbiote-0.2.0 | lib/symbiote/factory.rb |