Sha256: 5ccd853c19e8035bc5149ec050a2f4614d312d88f929f299fe7f40074bf0d299
Contents?: true
Size: 1.02 KB
Versions: 5
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/,'').classify klass = class_name.constantize # autoload base.extend(klass) end end end end end
Version data entries
5 entries across 5 versions & 1 rubygems