Class: RaccMatchParser::Penalty
- Inherits:
-
Struct
- Object
- Struct
- RaccMatchParser::Penalty
- Defined in:
- lib/sportdb/parser/racc_tree.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#note ⇒ Object
Returns the value of attribute note.
-
#score ⇒ Object
Returns the value of attribute score.
Instance Method Summary collapse
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
57 58 59 |
# File 'lib/sportdb/parser/racc_tree.rb', line 57 def name @name end |
#note ⇒ Object
Returns the value of attribute note
57 58 59 |
# File 'lib/sportdb/parser/racc_tree.rb', line 57 def note @note end |
#score ⇒ Object
Returns the value of attribute score
57 58 59 |
# File 'lib/sportdb/parser/racc_tree.rb', line 57 def score @score end |
Instance Method Details
#pretty_print(printer) ⇒ Object
67 68 69 |
# File 'lib/sportdb/parser/racc_tree.rb', line 67 def pretty_print( printer ) printer.text( to_s ) end |
#to_s ⇒ Object
58 59 60 61 62 63 64 |
# File 'lib/sportdb/parser/racc_tree.rb', line 58 def to_s buf = String.new buf << "#{self.score[0]}-#{self.score[1]} " if self.score buf << self.name buf << " (#{self.note})" if self.note buf end |