Class: Hocon::Impl::ConfigNodeInclude
- Inherits:
-
Object
- Object
- Hocon::Impl::ConfigNodeInclude
- Includes:
- AbstractConfigNode
- Defined in:
- lib/hocon/impl/config_node_include.rb
Instance Attribute Summary collapse
-
#children ⇒ Object
readonly
Returns the value of attribute children.
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
Instance Method Summary collapse
-
#initialize(children, kind) ⇒ ConfigNodeInclude
constructor
A new instance of ConfigNodeInclude.
- #name ⇒ Object
- #tokens ⇒ Object
Methods included from AbstractConfigNode
Methods included from Parser::ConfigNode
Constructor Details
#initialize(children, kind) ⇒ ConfigNodeInclude
Returns a new instance of ConfigNodeInclude.
10 11 12 13 |
# File 'lib/hocon/impl/config_node_include.rb', line 10 def initialize(children, kind) @children = children @kind = kind end |
Instance Attribute Details
#children ⇒ Object (readonly)
Returns the value of attribute children.
15 16 17 |
# File 'lib/hocon/impl/config_node_include.rb', line 15 def children @children end |
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
15 16 17 |
# File 'lib/hocon/impl/config_node_include.rb', line 15 def kind @kind end |
Instance Method Details
#name ⇒ Object
25 26 27 28 29 30 31 32 |
# File 'lib/hocon/impl/config_node_include.rb', line 25 def name @children.each do |child| if child.is_a?(Hocon::Impl::ConfigNodeSimpleValue) return Hocon::Impl::Tokens.value(child.token).unwrapped end end nil end |
#tokens ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/hocon/impl/config_node_include.rb', line 17 def tokens tokens = [] @children.each do |child| tokens += child.tokens end tokens end |