Class: SportDb::Parser::NotaBene

Inherits:
Struct
  • Object
show all
Defined in:
lib/sportdb/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



148
149
150
# File 'lib/sportdb/parser/parse_tree.rb', line 148

def text
  @text
end

Instance Method Details

#as_jsonObject



149
150
151
# File 'lib/sportdb/parser/parse_tree.rb', line 149

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

#pretty_print(q) ⇒ Object



152
153
154
155
156
# File 'lib/sportdb/parser/parse_tree.rb', line 152

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