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



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

def minutes
  @minutes
end

#playerObject

Returns the value of attribute player

Returns:

  • (Object)

    the current value of player



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

def player
  @player
end

Instance Method Details

#pretty_print(printer) ⇒ Object



283
284
285
# File 'lib/sportdb/parser.rb', line 283

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

#to_sObject



275
276
277
278
279
280
281
# File 'lib/sportdb/parser.rb', line 275

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