class Oktest::SpecLeaf

Attributes

block[R]
desc[R]
location[R]
tag[R]

Public Class Methods

new(parent, desc, tag: nil, location: nil, &block) click to toggle source
# File lib/oktest.rb, line 1081
def initialize(parent, desc, tag: nil, location: nil, &block)
  #@parent = parent      # not keep parent node to avoid recursive reference
  @desc  = desc
  @tag   = tag
  @location = location   # necessary when raising fixture not found error
  @block = block
  parent.add_child(self) if parent
end

Public Instance Methods

-@() click to toggle source
# File lib/oktest.rb, line 1119
def -@
  #; [!bua80] returns self.
  self
end
_prefix() click to toggle source
# File lib/oktest.rb, line 1092
def _prefix
  '-'
end
accept_visitor(visitor, *args) click to toggle source
# File lib/oktest.rb, line 1101
def accept_visitor(visitor, *args)
  #; [!ya32z] invokes 'visit_spec()' method of visitor and returns result of it.
  return visitor.visit_spec(self, *args)
end
run_block_in_context_object(context, *args) click to toggle source
# File lib/oktest.rb, line 1096
def run_block_in_context_object(context, *args)
  #; [!tssim] run spec block in text object.
  context.instance_exec(*args, &@block)
end