Class: SportDb::Parser::MatchLineLegs
- Defined in:
- lib/sportdb/parser/parse_tree-match.rb
Instance Attribute Summary collapse
-
#score ⇒ Object
Returns the value of attribute score.
-
#team1 ⇒ Object
Returns the value of attribute team1.
-
#team2 ⇒ Object
Returns the value of attribute team2.
Instance Method Summary collapse
Instance Attribute Details
#score ⇒ Object
Returns the value of attribute score
21 22 23 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 21 def score @score end |
#team1 ⇒ Object
Returns the value of attribute team1
21 22 23 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 21 def team1 @team1 end |
#team2 ⇒ Object
Returns the value of attribute team2
21 22 23 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 21 def team2 @team2 end |
Instance Method Details
#pretty_print(q) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/sportdb/parser/parse_tree-match.rb', line 23 def pretty_print( q ) q.group( 4, '<MatchLineLegs ', '>') do ## group( indent, open, close) q.text( "#{team1} v #{team2}") members.zip(values) do |name, value| next if [:team1, :team2].include?( name ) next if value.nil? q.breakable q.text( "#{name}=" ) q.pp( value ) end end end |