Class: RaccMatchParser::Minute

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#mObject

Returns the value of attribute m

Returns:

  • (Object)

    the current value of m



509
510
511
# File 'lib/sportdb/parser/racc_tree.rb', line 509

def m
  @m
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



509
510
511
# File 'lib/sportdb/parser/racc_tree.rb', line 509

def offset
  @offset
end

#secsObject

Returns the value of attribute secs

Returns:

  • (Object)

    the current value of secs



509
510
511
# File 'lib/sportdb/parser/racc_tree.rb', line 509

def secs
  @secs
end

Instance Method Details

#pretty_print(printer) ⇒ Object



519
520
521
# File 'lib/sportdb/parser/racc_tree.rb', line 519

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

#to_sObject



510
511
512
513
514
515
516
517
# File 'lib/sportdb/parser/racc_tree.rb', line 510

def to_s
  buf = String.new
  buf << "#{self.m}"
  buf << "'"
  buf << "+#{self.offset}"      if self.offset
  buf << "/#{self.secs} secs"   if self.secs
  buf
end