Class: SportDb::Parser::GoalType

Inherits:
Struct
  • Object
show all
Defined in:
lib/sportdb/parser/parse_tree-match.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#freekickObject

Returns the value of attribute freekick

Returns:

  • (Object)

    the current value of freekick



272
273
274
# File 'lib/sportdb/parser/parse_tree-match.rb', line 272

def freekick
  @freekick
end

#headerObject

Returns the value of attribute header

Returns:

  • (Object)

    the current value of header



272
273
274
# File 'lib/sportdb/parser/parse_tree-match.rb', line 272

def header
  @header
end

#ogObject

Returns the value of attribute og

Returns:

  • (Object)

    the current value of og



272
273
274
# File 'lib/sportdb/parser/parse_tree-match.rb', line 272

def og
  @og
end

#penObject

Returns the value of attribute pen

Returns:

  • (Object)

    the current value of pen



272
273
274
# File 'lib/sportdb/parser/parse_tree-match.rb', line 272

def pen
  @pen
end

Instance Method Details

#pretty_print(q) ⇒ Object



282
283
284
# File 'lib/sportdb/parser/parse_tree-match.rb', line 282

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

#to_sObject



273
274
275
276
277
278
279
280
# File 'lib/sportdb/parser/parse_tree-match.rb', line 273

def to_s
  buf = String.new
  buf << "(og)"   if og
  buf << "(pen)"  if pen
  buf << "(f)"    if freekick
  buf << "(h)"    if header
  buf
end