Sha256: c7fb139aee89ba46eaab0d5e455aad4075010ce296c472052c6aff31514e964c

Contents?: true

Size: 537 Bytes

Versions: 19

Compression:

Stored size: 537 Bytes

Contents

require 'saucy/layouts'

module Saucy
  class Configuration
    cattr_reader   :layouts
    cattr_accessor :mailer_sender
    cattr_accessor :merchant_account_id
    cattr_accessor :observers

    def initialize
      @@mailer_sender = 'donotreply@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

19 entries across 19 versions & 1 rubygems

Version Path
saucy-0.6.1 lib/saucy/configuration.rb
saucy-0.6.0 lib/saucy/configuration.rb
saucy-0.5.5 lib/saucy/configuration.rb
saucy-0.5.4 lib/saucy/configuration.rb
saucy-0.5.3 lib/saucy/configuration.rb
saucy-0.5.2 lib/saucy/configuration.rb
saucy-0.5.1 lib/saucy/configuration.rb
saucy-0.5.0 lib/saucy/configuration.rb
saucy-0.4.10 lib/saucy/configuration.rb
saucy-0.4.9 lib/saucy/configuration.rb
saucy-0.4.8 lib/saucy/configuration.rb
saucy-0.4.7 lib/saucy/configuration.rb
saucy-0.4.6 lib/saucy/configuration.rb
saucy-0.4.5 lib/saucy/configuration.rb
saucy-0.4.4 lib/saucy/configuration.rb
saucy-0.4.3 lib/saucy/configuration.rb
saucy-0.4.2 lib/saucy/configuration.rb
saucy-0.4.1 lib/saucy/configuration.rb
saucy-0.4.0 lib/saucy/configuration.rb