Class: Avo::Licensing::LicenseManager

Inherits:
Object
  • Object
show all
Defined in:
lib/avo/licensing/license_manager.rb

Instance Method Summary collapse

Constructor Details

#initialize(hq_response) ⇒ LicenseManager

Returns a new instance of LicenseManager.



4
5
6
# File 'lib/avo/licensing/license_manager.rb', line 4

def initialize(hq_response)
  @hq_response = hq_response
end

Instance Method Details

#licenseObject



8
9
10
11
12
13
14
15
16
17
# File 'lib/avo/licensing/license_manager.rb', line 8

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