Class: Avo::Licensing::LicenseManager
- Inherits:
-
Object
- Object
- Avo::Licensing::LicenseManager
- Defined in:
- lib/avo/licensing/license_manager.rb
Instance Method Summary collapse
-
#initialize(hq_response) ⇒ LicenseManager
constructor
A new instance of LicenseManager.
- #license ⇒ Object
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
#license ⇒ Object
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 |