Sha256: aa21e68976b2795c79c47ca00923d293f77a3fe9aacbc7b662594347c30df096

Contents?: true

Size: 535 Bytes

Versions: 40

Compression:

Stored size: 535 Bytes

Contents

require 'erb'
require 'yaml'

module Killbill
  module Plugin
    module ActiveMerchant
      class Properties
        def initialize(file)
          @config_file = Pathname.new(file).expand_path
        end

        def parse!
          raise "#{@config_file} is not a valid file" unless @config_file.file?
          @config = YAML.load(ERB.new(File.read(@config_file.to_s)).result)
        end

        def [](key)
          @config[key]
        end

        def to_hash
          @config.dup
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
killbill-9.4.1 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.6 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.4.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.3.2 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.3.1 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.5 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.3.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.2.2 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.4 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.3 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.2.1 lib/killbill/helpers/active_merchant/properties.rb
killbill-9.2.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.2 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.1 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.3.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.2.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.1.0 lib/killbill/helpers/active_merchant/properties.rb
killbill-7.0.6 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.0.1 lib/killbill/helpers/active_merchant/properties.rb
killbill-8.0.0 lib/killbill/helpers/active_merchant/properties.rb