Class: Fbtxt::Parser::NoteLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/fbtxt/parser/parse_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



136
137
138
# File 'lib/fbtxt/parser/parse_tree.rb', line 136

def text
  @text
end

Instance Method Details

#as_jsonObject



137
138
139
# File 'lib/fbtxt/parser/parse_tree.rb', line 137

def as_json(*)
  ['<NoteLine>', { 'text' => text.as_json } ]
end

#pretty_print(q) ⇒ Object



140
141
142
143
144
# File 'lib/fbtxt/parser/parse_tree.rb', line 140

def pretty_print( q )
  q.group( 4, '<NoteLine ', '>' ) do
    q.text( text )
  end
end