Sha256: b130cd1fcda9ab025ea4ccab7c86803ca83123e17c3c3ca52d83a572883ec3ab

Contents?: true

Size: 646 Bytes

Versions: 14

Compression:

Stored size: 646 Bytes

Contents

require 'saucy/layouts'

module Saucy
  class Configuration
    cattr_reader   :layouts
    cattr_accessor :manager_email_address
    cattr_accessor :support_email_address
    cattr_accessor :merchant_account_id
    cattr_accessor :observers

    def initialize
      @@manager_email_address = 'manager@example.com'
      @@support_email_address = 'support@example.com'
      @@layouts       = Layouts.new
      @@observers     = []
    end

    def self.observe(observer)
      @@observers << observer
    end

    def self.notify(event, data)
      @@observers.each do |observer|
        observer.send(event, data)
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
saasy-0.0.2.alpha3 lib/saucy/configuration.rb
saasy-0.0.2.alpha2 lib/saucy/configuration.rb
saasy-0.0.2.alpha1 lib/saucy/configuration.rb
saucy-0.8.5 lib/saucy/configuration.rb
saucy-0.8.4 lib/saucy/configuration.rb
saucy-0.8.3 lib/saucy/configuration.rb
saasy-0.0.1 lib/saucy/configuration.rb
saucy-0.8.2 lib/saucy/configuration.rb
saucy-0.8.1 lib/saucy/configuration.rb
saucy-0.8.0 lib/saucy/configuration.rb
saucy-0.7.3 lib/saucy/configuration.rb
saucy-0.7.2 lib/saucy/configuration.rb
saucy-0.7.1 lib/saucy/configuration.rb
saucy-0.7.0 lib/saucy/configuration.rb