Module: EacConfig::Node

Included in:
EnvvarsNode, PrefixedPathNode, YamlFileNode
Defined in:
lib/eac_config/node.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#write_nodeObject

Returns the value of attribute write_node.



20
21
22
# File 'lib/eac_config/node.rb', line 20

def write_node
  @write_node
end

Class Method Details

.contextObject



15
16
17
# File 'lib/eac_config/node.rb', line 15

def context
  @context ||= ::EacRubyUtils::Context.new
end

Instance Method Details

#entry(path) ⇒ Object



27
28
29
# File 'lib/eac_config/node.rb', line 27

def entry(path)
  ::EacConfig::Entry.new(self, path)
end

#load_path[EacConfig::IncludePath]

Returns:

  • ([EacConfig::IncludePath])


32
33
34
# File 'lib/eac_config/node.rb', line 32

def load_path
  @load_path ||= ::EacConfig::LoadPath.new(self)
end

#recursive_loaded_nodesArray<EacConfig::Node>

Returns:



57
58
59
# File 'lib/eac_config/node.rb', line 57

def recursive_loaded_nodes
  ::EacConfig::LoadNodesSearch.new(self).result
end

#self_entry(path) ⇒ EacConfig::NodeEntry

Return a entry which search values only in the self node.



43
44
45
# File 'lib/eac_config/node.rb', line 43

def self_entry(path)
  self_entry_class.new(self, path)
end

#self_entry_classObject



47
48
49
# File 'lib/eac_config/node.rb', line 47

def self_entry_class
  self.class.const_get('Entry')
end

#self_loaded_nodesArray<EacConfig::Node>

Returns:



52
53
54
# File 'lib/eac_config/node.rb', line 52

def self_loaded_nodes
  load_path.paths.map { |node_path| load_node(node_path) }
end

#urlAddressable::URI

Returns:

  • (Addressable::URI)


37
38
39
# File 'lib/eac_config/node.rb', line 37

def url
  raise_abstract_method(__method__)
end

#with_prefix(path_prefix) ⇒ EacConfig::PrefixedPathNode



62
63
64
65
# File 'lib/eac_config/node.rb', line 62

def with_prefix(path_prefix)
  require 'eac_config/prefixed_path_node'
  ::EacConfig::PrefixedPathNode.new(self, path_prefix)
end