Class: Lono::AppFile::Registry

Inherits:
Object
  • Object
show all
Defined in:
lib/lono/app_file/registry.rb,
lib/lono/app_file/registry/item.rb

Defined Under Namespace

Classes: Item

Constant Summary collapse

@@items =
[]

Class Method Summary collapse

Class Method Details

.layersObject



11
12
13
# File 'lib/lono/app_file/registry.rb', line 11

def layers
  @@items.select { |i| i.type == "lambda_layer" }
end

.register(name, blueprint, options = {}) ⇒ Object



7
8
9
# File 'lib/lono/app_file/registry.rb', line 7

def register(name, blueprint, options={})
  @@items << Item.new(name, blueprint, options) unless @@items.detect { |i| i.name == name && i.type == options[:type] }
end