Sha256: c5f87f39a60e22fc007b1e78dc9729d64810bd20abfbbf6cbc08854de90d566f

Contents?: true

Size: 635 Bytes

Versions: 2

Compression:

Stored size: 635 Bytes

Contents

class Lono::AppFile::Registry
  # Holds metadata about the item in the regsitry.
  class Item
    include Lono::Utils::Item::FileMethods

    attr_reader :name, :options, :type
    def initialize(name, blueprint, options={})
      @name, @blueprint.name, @options = name, blueprint, options
      @type = options[:type] || "file"
    end

    def src_path
      "#{@blueprint.root}/app/files/#{@name}"
    end

    def output_path
      if @type == "file"
        "#{Lono.root}/output/#{@blueprint.name}/files/#{@name}"
      else
        "#{Lono.root}/output/#{@blueprint.name}/lambda_layers/#{@name}/opt"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
lono-8.0.0.pre.rc2 lib/lono/app_file/registry/item.rb
lono-8.0.0.pre.rc1 lib/lono/app_file/registry/item.rb