Sha256: 36726f5faeb6c7a7f73e1f9916c397b3e02f3af5a6eba59f1e05fc46def9a455
Contents?: true
Size: 1.02 KB
Versions: 3
Compression:
Stored size: 1.02 KB
Contents
class Jets::Stack class Main module Dsl extend ActiveSupport::Concern autoload :Base, 'jets/stack/main/extensions/base' autoload :Cloudwatch, 'jets/stack/main/extensions/cloudwatch' autoload :Iam, 'jets/stack/main/extensions/iam' autoload :Lambda, 'jets/stack/main/extensions/lambda' autoload :S3, 'jets/stack/main/extensions/s3' autoload :Sns, 'jets/stack/main/extensions/sns' autoload :Sqs, 'jets/stack/main/extensions/sqs' class_methods do include Base include Cloudwatch include Iam include Lambda include S3 include Sns include Sqs end def self.included(base) base_path = "#{Jets.root}/app/shared/extensions" Dir.glob("#{base_path}/**/*.rb").each do |path| next unless File.file?(path) class_name = path.sub("#{base_path}/", '').sub(/\.rb/,'').camelize klass = class_name.constantize # autoload base.extend(klass) end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
jets-1.9.7 | lib/jets/stack/main/dsl.rb |
jets-1.9.6 | lib/jets/stack/main/dsl.rb |
jets-1.9.5 | lib/jets/stack/main/dsl.rb |