Sha256: 59a6a741ad482f6a9fd3518af4ef2f99e20cf0acd55a0b31cbd32ba2f64a7350
Contents?: true
Size: 560 Bytes
Versions: 1
Compression:
Stored size: 560 Bytes
Contents
module Killbill::Stripe class Properties def initialize(file = 'stripe.yml') @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_file(@config_file.to_s) validate! end def [](key) @config[key] end private def validate! raise "Bad configuration for Stripe plugin. Config is #{@config.inspect}" if @config.blank? || !@config[:stripe] || !@config[:stripe][:api_secret_key] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
killbill-stripe-0.1.0 | lib/stripe/config/properties.rb |