Class: RaccMatchParser::GoalType

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#freekickObject

Returns the value of attribute freekick

Returns:

  • (Object)

    the current value of freekick



493
494
495
# File 'lib/sportdb/parser/racc_tree.rb', line 493

def freekick
  @freekick
end

#headerObject

Returns the value of attribute header

Returns:

  • (Object)

    the current value of header



493
494
495
# File 'lib/sportdb/parser/racc_tree.rb', line 493

def header
  @header
end

#ogObject

Returns the value of attribute og

Returns:

  • (Object)

    the current value of og



493
494
495
# File 'lib/sportdb/parser/racc_tree.rb', line 493

def og
  @og
end

#penObject

Returns the value of attribute pen

Returns:

  • (Object)

    the current value of pen



493
494
495
# File 'lib/sportdb/parser/racc_tree.rb', line 493

def pen
  @pen
end

Instance Method Details

#pretty_print(printer) ⇒ Object



503
504
505
# File 'lib/sportdb/parser/racc_tree.rb', line 503

def pretty_print( printer )
   printer.text( to_s )
end

#to_sObject



494
495
496
497
498
499
500
501
# File 'lib/sportdb/parser/racc_tree.rb', line 494

def to_s
  buf = String.new
  buf << "(og)"   if self.og
  buf << "(pen)"  if self.pen
  buf << "(f)"    if self.freekick
  buf << "(h)"    if self.header
  buf
end