Sha256: 622db4683799bb08d82a55414302e88bb8271c74380479cec81230156d00144e

Contents?: true

Size: 851 Bytes

Versions: 22

Compression:

Stored size: 851 Bytes

Contents

# frozen_string_literal: true

require 'eac_config/entry_path'
require 'eac_ruby_utils/core_ext'

module EacConfig
  class Entries
    require_sub __FILE__
    enable_simple_cache
    common_constructor :root_node, :path do
      self.path = ::EacConfig::EntryPath.assert(path)
    end

    def to_s
      "#{self.class}[RootNode: #{root_node}, Path: #{path}]"
    end

    private

    # @return [Array<EacConfig::Entries>]
    def node_entries_uncached
      node_entries_from_root + node_entries_from_load_path
    end

    # @return [Array<EacConfig::Entries>]
    def node_entries_from_load_path_uncached
      root_node.recursive_loaded_nodes.flat_map { |loaded_node| loaded_node.self_entries(path) }
    end

    # @return [Array<EacConfig::Entries>]
    def node_entries_from_root_uncached
      root_node.self_entries(path)
    end
  end
end

Version data entries

22 entries across 22 versions & 2 rubygems

Version Path
eac_config-0.14.3 lib/eac_config/entries.rb
eac_tools-0.97.2 sub/eac_config/lib/eac_config/entries.rb
eac_config-0.14.2 lib/eac_config/entries.rb
eac_tools-0.82.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.81.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.80.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.79.0 sub/eac_config/lib/eac_config/entries.rb
eac_config-0.14.1 lib/eac_config/entries.rb
eac_tools-0.78.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.77.1 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.77.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.76.1 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.76.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.75.2 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.75.1 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.75.0 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.74.1 sub/eac_config/lib/eac_config/entries.rb
eac_tools-0.74.0 sub/eac_config/lib/eac_config/entries.rb
eac_config-0.14.0 lib/eac_config/entries.rb
eac_tools-0.73.0 sub/eac_config/lib/eac_config/entries.rb