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.



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

def write_node
  @write_node
end

Class Method Details

.contextObject



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

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

Instance Method Details

#entries(path) ⇒ Array<EacConfig::Entries>

Returns:



29
30
31
# File 'lib/eac_config/node.rb', line 29

def entries(path)
  ::EacConfig::Entries.new(self, path)
end

#entry(path) ⇒ Object



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

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

#load_path[EacConfig::IncludePath]

Returns:

  • ([EacConfig::IncludePath])


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

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

#recursive_loaded_nodesArray<EacConfig::Node>

Returns:



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

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.



49
50
51
# File 'lib/eac_config/node.rb', line 49

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

#self_entry_classObject



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

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

#self_loaded_nodesArray<EacConfig::Node>

Returns:



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

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

#urlAddressable::URI

Returns:

  • (Addressable::URI)


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

def url
  raise_abstract_method(__method__)
end

#with_prefix(path_prefix) ⇒ EacConfig::PrefixedPathNode



68
69
70
71
# File 'lib/eac_config/node.rb', line 68

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