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_config-0.14.2 lib/eac_config/load_path.rb
eac_tools-0.82.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.81.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.80.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.79.0 sub/eac_config/lib/eac_config/load_path.rb
eac_config-0.14.1 lib/eac_config/load_path.rb
eac_tools-0.78.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.77.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.77.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.76.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.76.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.75.2 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.75.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.75.0 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.74.1 sub/eac_config/lib/eac_config/load_path.rb
eac_tools-0.74.0 sub/eac_config/lib/eac_config/load_path.rb
eac_config-0.14.0 lib/eac_config/load_path.rb
eac_tools-0.73.0 sub/eac_config/lib/eac_config/load_path.rb
eac_config-0.13.0 lib/eac_config/load_path.rb
eac_tools-0.72.0 sub/eac_config/lib/eac_config/load_path.rb