Class: RaccMatchParser::Minute

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

Overview

fix - move :og, :pen to Goal if possible - why? why not?

or change to GoalMinute ???

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



146
147
148
# File 'lib/sportdb/parser/racc_tree.rb', line 146

def m
  @m
end

#offsetObject

Returns the value of attribute offset

Returns:

  • (Object)

    the current value of offset



146
147
148
# File 'lib/sportdb/parser/racc_tree.rb', line 146

def offset
  @offset
end

#ogObject

Returns the value of attribute og

Returns:

  • (Object)

    the current value of og



146
147
148
# File 'lib/sportdb/parser/racc_tree.rb', line 146

def og
  @og
end

#penObject

Returns the value of attribute pen

Returns:

  • (Object)

    the current value of pen



146
147
148
# File 'lib/sportdb/parser/racc_tree.rb', line 146

def pen
  @pen
end

Instance Method Details

#pretty_print(printer) ⇒ Object



157
158
159
# File 'lib/sportdb/parser/racc_tree.rb', line 157

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

#to_sObject



147
148
149
150
151
152
153
154
155
# File 'lib/sportdb/parser/racc_tree.rb', line 147

def to_s
  buf = String.new
  buf << "#{self.m}"
  buf << "+#{self.offset}"  if self.offset 
  buf << "'"
  buf << "(og)"   if self.og
  buf << "(pen)"  if self.pen
  buf
end