Sha256: c8c5b5cc14312fe1ed36ff1e9f7135e64629087e65e4ba31f4e1673cac478e6b

Contents?: true

Size: 701 Bytes

Versions: 9

Compression:

Stored size: 701 Bytes

Contents

module Beso
  module Config
    extend ActiveSupport::Concern

    included do
      reset!
    end

    module ClassMethods
      def configure
        yield self
      end

      mattr_accessor :access_key
      mattr_accessor :secret_key
      mattr_accessor :bucket_name
      mattr_accessor :aws_region

      def job( name, options, &block )
        job = Job.new( name, options )
        job.instance_eval &block if block_given?
        jobs << job
      end

      def jobs
        @@jobs ||= [ ]
      end

      def reset!
        @@jobs        = [ ]
        @@access_key  = nil
        @@secret_key  = nil
        @@bucket_name = nil
        @@aws_region  = nil
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
beso-0.3.5 lib/beso/config.rb
beso-0.3.4 lib/beso/config.rb
beso-0.3.3 lib/beso/config.rb
beso-0.3.2 lib/beso/config.rb
beso-0.3.1 lib/beso/config.rb
beso-0.3.0 lib/beso/config.rb
beso-0.2.1 lib/beso/config.rb
beso-0.2.0 lib/beso/config.rb
beso-0.1.0 lib/beso/config.rb