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



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

def minutes
  @minutes
end

#playerObject

Returns the value of attribute player

Returns:

  • (Object)

    the current value of player



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

def player
  @player
end

Instance Method Details

#pretty_print(printer) ⇒ Object



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

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

#to_sObject



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

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