Class: RaccMatchParser::MatchLine

Inherits:
Struct
  • Object
show all
Defined in:
lib/sportdb/parser/racc_tree.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def date
  @date
end

#geoObject

Returns the value of attribute geo

Returns:

  • (Object)

    the current value of geo



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def geo
  @geo
end

#ordObject

Returns the value of attribute ord

Returns:

  • (Object)

    the current value of ord



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def ord
  @ord
end

#scoreObject

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def score
  @score
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def status
  @status
end

#team1Object

Returns the value of attribute team1

Returns:

  • (Object)

    the current value of team1



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def team1
  @team1
end

#team2Object

Returns the value of attribute team2

Returns:

  • (Object)

    the current value of team2



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def team2
  @team2
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def time
  @time
end

#timezoneObject

Returns the value of attribute timezone

Returns:

  • (Object)

    the current value of timezone



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def timezone
  @timezone
end

#wdayObject

Returns the value of attribute wday

Returns:

  • (Object)

    the current value of wday



138
139
140
# File 'lib/sportdb/parser/racc_tree.rb', line 138

def wday
  @wday
end

Instance Method Details

#pretty_print(printer) ⇒ Object



144
145
146
147
148
149
150
151
152
153
154
155
156
157
# File 'lib/sportdb/parser/racc_tree.rb', line 144

def pretty_print( printer )
  printer.text( "<MatchLine " )
  printer.text( "#{self.team1} v #{self.team2}")
  printer.breakable

  members.zip(values) do |name, value|
    next if [:team1, :team2].include?( name )
    next if value.nil?
    
    printer.text( "#{name}=#{value.pretty_inspect}" )
  end    

  printer.text( ">" )
end