Class: RaccMatchParser::DateHeader

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



170
171
172
# File 'lib/sportdb/parser/racc_tree.rb', line 170

def date
  @date
end

#yearObject

Returns the value of attribute year

Returns:

  • (Object)

    the current value of year



170
171
172
# File 'lib/sportdb/parser/racc_tree.rb', line 170

def year
  @year
end

Instance Method Details

#pretty_print(printer) ⇒ Object



171
172
173
174
175
176
# File 'lib/sportdb/parser/racc_tree.rb', line 171

def pretty_print( printer )
  printer.text( "<DateHeader " )
  printer.text( "#{self.date.pretty_inspect}" )  if self.date
  printer.text( "#{self.year.pretty_inspect}" )  if self.year
  printer.text( ">")
end