Module: EacConfig::Node
- Included in:
- EnvvarsNode, PrefixedPathNode, YamlFileNode
- Defined in:
- lib/eac_config/node.rb
Instance Attribute Summary collapse
-
#write_node ⇒ Object
Returns the value of attribute write_node.
Class Method Summary collapse
Instance Method Summary collapse
- #entries(path) ⇒ Array<EacConfig::Entries>
- #entry(path) ⇒ Object
- #load_path ⇒ [EacConfig::IncludePath]
- #recursive_loaded_nodes ⇒ Array<EacConfig::Node>
-
#self_entry(path) ⇒ EacConfig::NodeEntry
Return a entry which search values only in the self node.
- #self_entry_class ⇒ Object
- #self_loaded_nodes ⇒ Array<EacConfig::Node>
- #url ⇒ Addressable::URI
- #with_prefix(path_prefix) ⇒ EacConfig::PrefixedPathNode
Instance Attribute Details
#write_node ⇒ Object
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
.context ⇒ Object
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>
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]
38 39 40 |
# File 'lib/eac_config/node.rb', line 38 def load_path @load_path ||= ::EacConfig::LoadPath.new(self) end |
#recursive_loaded_nodes ⇒ Array<EacConfig::Node>
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_class ⇒ Object
53 54 55 |
# File 'lib/eac_config/node.rb', line 53 def self_entry_class self.class.const_get('Entry') end |
#self_loaded_nodes ⇒ Array<EacConfig::Node>
58 59 60 |
# File 'lib/eac_config/node.rb', line 58 def self_loaded_nodes load_path.paths.flat_map { |node_path| load_nodes(node_path) } end |
#url ⇒ 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 |