Sha256: 364440c858a3ec5554e4ffc7d2be45dc29a1329a7666852c30bfa93aa6ac04a0
Contents?: true
Size: 776 Bytes
Versions: 16
Compression:
Stored size: 776 Bytes
Contents
module Chargify class << self attr_accessor :subdomain, :api_key, :site, :format, :timeout, :domain, :protocol def configure # Since site is dependent on other fields, we erase it before yielding so that it is recalculated based # on changes from any of the other settings self.site = nil yield self self.protocol = protocol || "https" self.domain = domain || "chargify.com" self.format = format || :xml self.subdomain = subdomain || "test" self.site = site || "#{protocol}://#{subdomain}.#{domain}" Base.site = site Base.user = api_key Base.password = 'X' Base.timeout = timeout unless (timeout.blank?) Base.format = format end end end
Version data entries
16 entries across 16 versions & 1 rubygems