Class: SportDb::Parser::GoalAlt
- Defined in:
- lib/sportdb/parser/parse_tree-match.rb
Overview
score and player REQUIRED note - (goal) minute is optional if no minute goal type is optional e.g. "standalone" (p), (og), etc.
Instance Attribute Summary collapse
-
#goal_type ⇒ Object
Returns the value of attribute goal_type.
-
#minute ⇒ Object
Returns the value of attribute minute.
-
#player ⇒ Object
Returns the value of attribute player.
-
#score ⇒ Object
Returns the value of attribute score.
Instance Method Summary collapse
Instance Attribute Details
#goal_type ⇒ Object
Returns the value of attribute goal_type
165 166 167 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 165 def goal_type @goal_type end |
#minute ⇒ Object
Returns the value of attribute minute
165 166 167 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 165 def minute @minute end |
#player ⇒ Object
Returns the value of attribute player
165 166 167 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 165 def player @player end |
#score ⇒ Object
Returns the value of attribute score
165 166 167 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 165 def score @score end |
Instance Method Details
#pretty_print(q) ⇒ Object
175 176 177 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 175 def pretty_print( q ) q.text( to_s ) end |
#to_s ⇒ Object
166 167 168 169 170 171 172 173 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 166 def to_s buf = String.new buf << "#{score[0]}-#{score[1]}" buf << " #{player}" buf << " #{minute}" if minute buf << " #{goal_type}" if goal_type buf end |