lib/lono/app_file/registry.rb in lono-7.2.3 vs lib/lono/app_file/registry.rb in lono-7.3.0
- old
+ new
@@ -1,14 +1,16 @@
module Lono::AppFile
class Registry
+ cattr_reader :items
@@items = []
+
class << self
def register(name, blueprint, options={})
- @@items << Item.new(name, blueprint, options) unless @@items.detect { |i| i.name == name }
+ @@items << Item.new(name, blueprint, options) unless @@items.detect { |i| i.name == name && i.type == options[:type] }
end
- def items
- @@items
+ def layers
+ @@items.select { |i| i.type == "lambda_layer" }
end
end
end
end