Class: RaccMatchParser::MatchLine

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

Overview

tty = TELETYPE MODE for teams and score!!

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attObject

Returns the value of attribute att

Returns:

  • (Object)

    the current value of att



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def att
  @att
end

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def date
  @date
end

#geoObject

Returns the value of attribute geo

Returns:

  • (Object)

    the current value of geo



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def geo
  @geo
end

#headerObject

Returns the value of attribute header

Returns:

  • (Object)

    the current value of header



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def header
  @header
end

#neutralObject

Returns the value of attribute neutral

Returns:

  • (Object)

    the current value of neutral



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def neutral
  @neutral
end

#noteObject

Returns the value of attribute note

Returns:

  • (Object)

    the current value of note



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def note
  @note
end

#numObject

Returns the value of attribute num

Returns:

  • (Object)

    the current value of num



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def num
  @num
end

#scoreObject

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def score
  @score
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def status
  @status
end

#status_inlineObject

Returns the value of attribute status_inline

Returns:

  • (Object)

    the current value of status_inline



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def status_inline
  @status_inline
end

#status_noteObject

Returns the value of attribute status_note

Returns:

  • (Object)

    the current value of status_note



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def status_note
  @status_note
end

#team1Object

Returns the value of attribute team1

Returns:

  • (Object)

    the current value of team1



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def team1
  @team1
end

#team2Object

Returns the value of attribute team2

Returns:

  • (Object)

    the current value of team2



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def team2
  @team2
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def time
  @time
end

#time_localObject

Returns the value of attribute time_local

Returns:

  • (Object)

    the current value of time_local



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def time_local
  @time_local
end

#ttyObject

Returns the value of attribute tty

Returns:

  • (Object)

    the current value of tty



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def tty
  @tty
end

#yearObject

Returns the value of attribute year

Returns:

  • (Object)

    the current value of year



287
288
289
# File 'lib/sportdb/parser/racc_tree.rb', line 287

def year
  @year
end

Instance Method Details

#pretty_print(printer) ⇒ Object



297
298
299
300
301
302
303
304
305
306
307
308
309
310
# File 'lib/sportdb/parser/racc_tree.rb', line 297

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