Class: SportDb::Parser::Heading3

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

Overview

Heading2

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



188
189
190
# File 'lib/sportdb/parser/parse_tree.rb', line 188

def text
  @text
end

Instance Method Details

#as_jsonObject



189
190
191
# File 'lib/sportdb/parser/parse_tree.rb', line 189

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

#pretty_print(q) ⇒ Object



193
194
195
196
197
# File 'lib/sportdb/parser/parse_tree.rb', line 193

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