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
32 33 34 |
# File 'lib/sportdb/parser/racc_tree.rb', line 32 def name @name end |
#note ⇒ Object
Returns the value of attribute note
32 33 34 |
# File 'lib/sportdb/parser/racc_tree.rb', line 32 def note @note end |
#score ⇒ Object
Returns the value of attribute score
32 33 34 |
# File 'lib/sportdb/parser/racc_tree.rb', line 32 def score @score end |
Instance Method Details
#pretty_print(printer) ⇒ Object
41 42 43 |
# File 'lib/sportdb/parser/racc_tree.rb', line 41 def pretty_print( printer ) printer.text( to_s ) end |
#to_s ⇒ Object
33 34 35 36 37 38 39 |
# File 'lib/sportdb/parser/racc_tree.rb', line 33 def to_s buf = String.new buf << "#{self.score} " if self.score buf << self.name buf << " (#{self.note})" if self.note buf end |