Class: NxBuild::SlnNode
- Inherits:
-
SlnProperty
- Object
- SlnProperty
- NxBuild::SlnNode
- Defined in:
- lib/nxbuild/sln/node.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#tag ⇒ Object
Returns the value of attribute tag.
Attributes inherited from SlnProperty
Instance Method Summary collapse
- #dump(buffer, indent = 0) ⇒ Object
-
#initialize(tag) ⇒ SlnNode
constructor
A new instance of SlnNode.
Constructor Details
#initialize(tag) ⇒ SlnNode
Returns a new instance of SlnNode.
8 9 10 11 12 |
# File 'lib/nxbuild/sln/node.rb', line 8 def initialize(tag) super() @tag = tag @children = [] end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
6 7 8 |
# File 'lib/nxbuild/sln/node.rb', line 6 def children @children end |
#tag ⇒ Object
Returns the value of attribute tag.
5 6 7 |
# File 'lib/nxbuild/sln/node.rb', line 5 def tag @tag end |
Instance Method Details
#dump(buffer, indent = 0) ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/nxbuild/sln/node.rb', line 14 def dump(buffer, indent = 0) buffer << "\t" * indent tagline = tag unless @key.nil? tagline += '(' + @key + ')' end unless @values.nil? tagline += ' = ' + @values.join(', ') end buffer << "#{tagline}\n" @children.each do |c| c.dump(buffer, indent + 1) end buffer << "\t" * indent buffer << "End#{@tag}\n" end |