Class: Fbtxt::Parser::Coach

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

Overview

CoachLine

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#countryObject

Returns the value of attribute country

Returns:

  • (Object)

    the current value of country



49
50
51
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 49

def country
  @country
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



49
50
51
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 49

def name
  @name
end

Instance Method Details

#pretty_print(q) ⇒ Object



57
58
59
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 57

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

#to_sObject



50
51
52
53
54
55
# File 'lib/fbtxt/parser/parse_tree-props.rb', line 50

def to_s
  buf = String.new
  buf <<  name
  buf << " (#{country})"    if country
  buf
end