Class: Oktest::TopicNode

Inherits:
Node show all
Defined in:
lib/oktest.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#context_class, #fixtures, #hooks, #parent, #tag

Instance Method Summary collapse

Methods inherited from Node

#_repr, #add_child, #clear_children, #each_child, #get_fixture_block, #get_hook_block, #has_child?, #new_context_object, #register_fixture_block, #register_hook_block, #remove_child_at, #run_block_in_context_class, #unlink_parent

Methods inherited from Item

#_repr, #unlink_parent

Constructor Details

#initialize(parent, target, tag: nil) ⇒ TopicNode

Returns a new instance of TopicNode.



1101
1102
1103
1104
# File 'lib/oktest.rb', line 1101

def initialize(parent, target, tag: nil)
  super(parent, tag: tag)
  @target = target
end

Instance Attribute Details

#_prefixObject



1109
1110
1111
# File 'lib/oktest.rb', line 1109

def _prefix
  @_prefix || '*'
end

#targetObject (readonly)

Returns the value of attribute target.



1106
1107
1108
# File 'lib/oktest.rb', line 1106

def target
  @target
end

Instance Method Details

#+@Object



1120
1121
1122
1123
# File 'lib/oktest.rb', line 1120

def +@
  #; [!tzorv] returns self.
  self
end

#accept_visitor(visitor, *args) ⇒ Object



1115
1116
1117
1118
# File 'lib/oktest.rb', line 1115

def accept_visitor(visitor, *args)
  #; [!c1b33] invokes 'visit_topic()' method of visitor and returns result of it.
  return visitor.visit_topic(self, *args)
end

#topic?Boolean

Returns:

  • (Boolean)


1113
# File 'lib/oktest.rb', line 1113

def topic?; true; end