Class: RaccMatchParser::Goal

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#minutesObject

Returns the value of attribute minutes

Returns:

  • (Object)

    the current value of minutes



266
267
268
# File 'lib/sportdb/parser.rb', line 266

def minutes
  @minutes
end

#playerObject

Returns the value of attribute player

Returns:

  • (Object)

    the current value of player



266
267
268
# File 'lib/sportdb/parser.rb', line 266

def player
  @player
end

Instance Method Details

#pretty_print(printer) ⇒ Object



275
276
277
# File 'lib/sportdb/parser.rb', line 275

def pretty_print( printer )
  printer.text( to_s )
end

#to_sObject



267
268
269
270
271
272
273
# File 'lib/sportdb/parser.rb', line 267

def to_s
  buf = String.new
  buf << "#{self.player}"
  buf << " "
  buf << minutes.map { |min| min.to_s }.join(' ')
  buf
end