Sha256: 05f65a4e2bd4a1facb052f06e1a93cf4a484d313bb20934ff8031594fecced0a

Contents?: true

Size: 501 Bytes

Versions: 186

Compression:

Stored size: 501 Bytes

Contents

# frozen_string_literal: true

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

module EacConfig
  class LoadPath
    ENTRY_PATH = ::EacConfig::EntryPath.assert(%w[load_path])

    common_constructor :node

    def entry
      node.self_entry(ENTRY_PATH)
    end

    # @return [Array<String>]
    def paths
      r = entry.value
      r.is_a?(::Array) ? r : []
    end

    def push(new_path)
      entry.value = paths + [new_path]
    end

    delegate :to_s, to: :paths
  end
end

Version data entries

186 entries across 186 versions & 4 rubygems

Version Path
eac_tools-0.70.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.70.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.69.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.69.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.68.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.67.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.67.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.66.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.65.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.65.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.64.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.63.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.62.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.62.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.61.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.61.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.60.3 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.60.2 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.60.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.60.0 sub/eac_config/lib/eac_config/load_path.rb