Class: Megingiard::BoldNode

Inherits:
Object
  • Object
show all
Defined in:
lib/megingiard/bold_node.rb

Overview

A node that makes all its children bold

Instance Method Summary collapse

Constructor Details

#initialize(child) ⇒ BoldNode

Returns a new instance of BoldNode.



8
9
10
# File 'lib/megingiard/bold_node.rb', line 8

def initialize(child)
  @child = child
end

Instance Method Details

#to_sObject



12
13
14
# File 'lib/megingiard/bold_node.rb', line 12

def to_s
  "#{BOLD_SEQUENCE}#{@child}#{RESET_SEQUENCE}"
end