Sha256: 52dc0558c69ff2a124c70ed44d5bb35c4a9cbbb7c194cc743cbe78e05ad4c842

Contents?: true

Size: 549 Bytes

Versions: 3

Compression:

Stored size: 549 Bytes

Contents

module MixpanelMagicLamp
  class << self
    attr_accessor :configuration
  end

  def self.configure
    self.configuration ||= Configuration.new
    yield(configuration)
  end

  class Configuration
    attr_accessor :api_key,
                  :api_secret,
                  :parallel,
                  :interval

    def initialize
      @parallel = true
      @interval = 30
    end

  end

  class ApiKeyMissingError < StandardError
    def initialize
      super "Missing API key and/or secret. Please, configure them."
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mixpanel_magic_lamp-1.0.3 lib/mixpanel_magic_lamp/configuration.rb
mixpanel_magic_lamp-1.0.1 lib/mixpanel_magic_lamp/configuration.rb
mixpanel_magic_lamp-1.0.0 lib/mixpanel_magic_lamp/configuration.rb