Class: Megingiard::BoldNode
- Inherits:
-
Object
- Object
- Megingiard::BoldNode
- Defined in:
- lib/megingiard/bold_node.rb
Overview
A node that makes all its children bold
Instance Method Summary collapse
-
#initialize(child) ⇒ BoldNode
constructor
A new instance of BoldNode.
- #to_s ⇒ Object
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_s ⇒ Object
12 13 14 |
# File 'lib/megingiard/bold_node.rb', line 12 def to_s "#{BOLD_SEQUENCE}#{@child}#{RESET_SEQUENCE}" end |