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



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def att
  @att
end

#dateObject

Returns the value of attribute date

Returns:

  • (Object)

    the current value of date



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def date
  @date
end

#geoObject

Returns the value of attribute geo

Returns:

  • (Object)

    the current value of geo



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def geo
  @geo
end

#headerObject

Returns the value of attribute header

Returns:

  • (Object)

    the current value of header



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def header
  @header
end

#neutralObject

Returns the value of attribute neutral

Returns:

  • (Object)

    the current value of neutral



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def neutral
  @neutral
end

#noteObject

Returns the value of attribute note

Returns:

  • (Object)

    the current value of note



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def note
  @note
end

#numObject

Returns the value of attribute num

Returns:

  • (Object)

    the current value of num



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def num
  @num
end

#scoreObject

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def score
  @score
end

#statusObject

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def status
  @status
end

#status_inlineObject

Returns the value of attribute status_inline

Returns:

  • (Object)

    the current value of status_inline



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def status_inline
  @status_inline
end

#status_noteObject

Returns the value of attribute status_note

Returns:

  • (Object)

    the current value of status_note



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def status_note
  @status_note
end

#team1Object

Returns the value of attribute team1

Returns:

  • (Object)

    the current value of team1



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def team1
  @team1
end

#team2Object

Returns the value of attribute team2

Returns:

  • (Object)

    the current value of team2



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def team2
  @team2
end

#timeObject

Returns the value of attribute time

Returns:

  • (Object)

    the current value of time



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def time
  @time
end

#time_localObject

Returns the value of attribute time_local

Returns:

  • (Object)

    the current value of time_local



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def time_local
  @time_local
end

#ttyObject

Returns the value of attribute tty

Returns:

  • (Object)

    the current value of tty



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def tty
  @tty
end

#yearObject

Returns the value of attribute year

Returns:

  • (Object)

    the current value of year



320
321
322
# File 'lib/sportdb/parser/racc_tree.rb', line 320

def year
  @year
end

Instance Method Details

#pretty_print(printer) ⇒ Object



330
331
332
333
334
335
336
337
338
339
340
341
342
343
# File 'lib/sportdb/parser/racc_tree.rb', line 330

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