lib/kelp/scoping.rb
# Execute a block of code inside a given scope. `scope` must be a `Hash`
# of parameters that describes the context in which to execute the block.
#
# @example
#    in_scope :within => '#footer'
#      click_link "Contact Us"
#    end
#
# @param [Hash] scope
#   Context in which to execute the block
# @option scope [String] :within
#   Selector string
#
Execute a block of code inside a given scope. `scope` must be a `Hash`
of parameters that describes the context in which to execute the block.
Execute a block of code inside a given scope . ` scope ` must be a ` Hash ` of parameters that describes the context in which to execute the block .
def in_scope(scope)
      scope_within(scope[:within]) do
        yield
      end
    end
def in_scope ( scope ) scope_within ( scope [ :within ] ) do yield end end
Execute a block of code inside a given scope.
Execute a block of code inside a given scope .
scope
:within Selector string
: within Selector string
<not_specific>
scope Context in which to execute the block
scope Context in which to execute the block
example
in_scope :within => '#footer' click_link "Contact Us" end
in_scope : within = > ' #footer ' click_link " Contact Us " end