Class: Mutant::License::Subscription Private
- Inherits:
-
Object
- Object
- Mutant::License::Subscription
- Defined in:
- lib/mutant/license/subscription.rb,
lib/mutant/license/subscription/commercial.rb,
lib/mutant/license/subscription/opensource.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Defined Under Namespace
Classes: Commercial, Opensource
Constant Summary collapse
- FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
<<~'MESSAGE' %<subscription_name>s subscription: Licensed: %<licensed>s MESSAGE
- FAILURE_FORMAT =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
<<~'MESSAGE' Can not validate %<subscription_name>s license. Licensed: %<expected>s Present: %<actual>s MESSAGE
Class Method Summary collapse
-
.load(world, value) ⇒ Subscription
private
Load value into subscription.
Instance Method Summary collapse
-
#description ⇒ String
private
Subscription self description.
Class Method Details
.load(world, value) ⇒ Subscription
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Load value into subscription
27 28 29 30 31 32 33 34 |
# File 'lib/mutant/license/subscription.rb', line 27 def self.load(world, value) { 'com' => Commercial, 'oss' => Opensource }.fetch(value.fetch('type')) .from_json(value.fetch('contents')) .call(world) end |
Instance Method Details
#description ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Subscription self description
39 40 41 42 43 44 |
# File 'lib/mutant/license/subscription.rb', line 39 def description FORMAT % { licensed: licensed.to_a.join("\n"), subscription_name: subscription_name } end |