Class: Hiptest::Nodes::Tag
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(key, value = nil) ⇒ Tag
constructor
A new instance of Tag.
- #to_s ⇒ Object
Methods inherited from Node
#==, #each_direct_children, #each_sub_nodes, #flat_string, #kind, #pretty_print_instance_variables, #project, #render
Constructor Details
#initialize(key, value = nil) ⇒ Tag
Returns a new instance of Tag.
260 261 262 263 |
# File 'lib/hiptest-publisher/nodes.rb', line 260 def initialize(key, value = nil) super() @children = {key: key, value: value} end |
Instance Method Details
#to_s ⇒ Object
265 266 267 |
# File 'lib/hiptest-publisher/nodes.rb', line 265 def to_s "#{@children[:key]}#{@children[:value].nil? ? '' : ':' + @children[:value]}" end |