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



542
543
544
# File 'lib/sportdb/parser/racc_tree.rb', line 542

def m
  @m
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



542
543
544
# File 'lib/sportdb/parser/racc_tree.rb', line 542

def offset
  @offset
end

#secsObject

Returns the value of attribute secs

Returns:

  • (Object)

    the current value of secs



542
543
544
# File 'lib/sportdb/parser/racc_tree.rb', line 542

def secs
  @secs
end

Instance Method Details

#pretty_print(printer) ⇒ Object



552
553
554
# File 'lib/sportdb/parser/racc_tree.rb', line 552

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

#to_sObject



543
544
545
546
547
548
549
550
# File 'lib/sportdb/parser/racc_tree.rb', line 543

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