Class: Fbtxt::MatchTree::Group
- Inherits:
-
Object
- Object
- Fbtxt::MatchTree::Group
- Defined in:
- lib/fbtxt/document/match_tree/group.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#teams ⇒ Object
readonly
Returns the value of attribute teams.
Instance Method Summary collapse
-
#initialize(name:, teams:) ⇒ Group
constructor
A new instance of Group.
- #pretty_print(q) ⇒ Object
Constructor Details
#initialize(name:, teams:) ⇒ Group
Returns a new instance of Group.
7 8 9 10 11 |
# File 'lib/fbtxt/document/match_tree/group.rb', line 7 def initialize( name:, teams: ) @name = name @teams = teams end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/fbtxt/document/match_tree/group.rb', line 5 def name @name end |
#teams ⇒ Object (readonly)
Returns the value of attribute teams.
5 6 7 |
# File 'lib/fbtxt/document/match_tree/group.rb', line 5 def teams @teams end |
Instance Method Details
#pretty_print(q) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/fbtxt/document/match_tree/group.rb', line 13 def pretty_print( q ) q.group( 4, '<Group', '>') do ## group( indent, open, close) q.text( " #{@name} " ) q.pp( @teams ) end end |