Class: RaccMatchParser::Sub

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#minuteObject

Returns the value of attribute minute

Returns:

  • (Object)

    the current value of minute



137
138
139
# File 'lib/sportdb/parser/racc_tree.rb', line 137

def minute
  @minute
end

#subObject

Returns the value of attribute sub

Returns:

  • (Object)

    the current value of sub



137
138
139
# File 'lib/sportdb/parser/racc_tree.rb', line 137

def sub
  @sub
end

Instance Method Details

#pretty_print(printer) ⇒ Object



138
139
140
141
142
143
144
145
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def pretty_print( printer )
  buf = String.new 
  buf << "("    ## note - possibly recursive (thus, let minute go first/print first/upfront)
  buf << "#{self.minute.to_s} "   if self.minute  
  buf << "#{self.sub.pretty_inspect}" 
  buf << ")"
  printer.text( buf ) 
end