Class: RaccMatchParser::Lineup

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#captainObject

Returns the value of attribute captain

Returns:

  • (Object)

    the current value of captain



111
112
113
# File 'lib/sportdb/parser/racc_tree.rb', line 111

def captain
  @captain
end

#cardsObject

Returns the value of attribute cards

Returns:

  • (Object)

    the current value of cards



111
112
113
# File 'lib/sportdb/parser/racc_tree.rb', line 111

def cards
  @cards
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



111
112
113
# File 'lib/sportdb/parser/racc_tree.rb', line 111

def name
  @name
end

#subObject

Returns the value of attribute sub

Returns:

  • (Object)

    the current value of sub



111
112
113
# File 'lib/sportdb/parser/racc_tree.rb', line 111

def sub
  @sub
end

Instance Method Details

#pretty_print(printer) ⇒ Object



112
113
114
115
116
117
118
119
# File 'lib/sportdb/parser/racc_tree.rb', line 112

def pretty_print( printer )
  buf = String.new
  buf <<  self.name 
  buf << " [c]"   if captain
  buf << " cards=" + self.cards.pretty_inspect    if cards
  buf << " sub=" + self.sub.pretty_inspect      if sub
  printer.text( buf ) 
end