Class: RaccMatchParser::Goal
- Inherits:
-
Struct
- Object
- Struct
- RaccMatchParser::Goal
- Defined in:
- lib/sportdb/parser/racc_tree.rb
Overview
change/rename Goal to GoalScorer - why? why not?
Instance Attribute Summary collapse
-
#count ⇒ Object
Returns the value of attribute count.
-
#minutes ⇒ Object
Returns the value of attribute minutes.
-
#player ⇒ Object
Returns the value of attribute player.
Instance Method Summary collapse
Instance Attribute Details
#count ⇒ Object
Returns the value of attribute count
370 371 372 |
# File 'lib/sportdb/parser/racc_tree.rb', line 370 def count @count end |
#minutes ⇒ Object
Returns the value of attribute minutes
370 371 372 |
# File 'lib/sportdb/parser/racc_tree.rb', line 370 def minutes @minutes end |
#player ⇒ Object
Returns the value of attribute player
370 371 372 |
# File 'lib/sportdb/parser/racc_tree.rb', line 370 def player @player end |
Instance Method Details
#pretty_print(printer) ⇒ Object
387 388 389 |
# File 'lib/sportdb/parser/racc_tree.rb', line 387 def pretty_print( printer ) printer.text( to_s ) end |
#to_s ⇒ Object
371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/sportdb/parser/racc_tree.rb', line 371 def to_s buf = String.new buf << "#{self.player}" if count buf << (" " + count.pretty_inspect + ",") else if minutes.nil? || minutes.empty? ## add nothing if no minutes available/present else buf << " " buf << minutes.map { |min| min.to_s }.join(' ') end end buf end |