Sha256: 4189f9b9e7a2a52599bee1ab6546d4253445e60b1976a4ce933415ca53191da4

Contents?: true

Size: 522 Bytes

Versions: 69

Compression:

Stored size: 522 Bytes

Contents

module Avo
  module Licensing
    class LicenseManager
      def initialize(hq_response)
        @hq_response = hq_response
      end

      def license
        case @hq_response["id"]
        when "community"
          CommunityLicense.new @hq_response
        when "pro"
          ProLicense.new @hq_response
        else
          NullLicense.new @hq_response
        end
      end

      def self.refresh_license(request)
        self.new(Licensing::HQ.new(request).fresh_response).license
      end
    end
  end
end

Version data entries

69 entries across 69 versions & 1 rubygems

Version Path
avo-2.5.1 lib/avo/licensing/license_manager.rb
avo-2.5.0 lib/avo/licensing/license_manager.rb
avo-2.4.1 lib/avo/licensing/license_manager.rb
avo-2.4.0 lib/avo/licensing/license_manager.rb
avo-2.3.1.pre.6 lib/avo/licensing/license_manager.rb
avo-2.3.1.pre.5 lib/avo/licensing/license_manager.rb
avo-2.3.1.pre.4 lib/avo/licensing/license_manager.rb
avo-2.3.1.pre.3 lib/avo/licensing/license_manager.rb
avo-2.3.1.pre.2 lib/avo/licensing/license_manager.rb