Class: Mutant::License::Subscription::Commercial::Individual Private
- Inherits:
-
Mutant::License::Subscription::Commercial
- Object
- Mutant::License::Subscription
- Mutant::License::Subscription::Commercial
- Mutant::License::Subscription::Commercial::Individual
- Defined in:
- lib/mutant/license/subscription/commercial.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.
Defined Under Namespace
Classes: Author
Constant Summary collapse
- SUBSCRIPTION_NAME =
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.
'commercial individual'
Constants inherited from Mutant::License::Subscription
Class Method Summary collapse
- .from_json(value) ⇒ Object private
Instance Method Summary collapse
- #call(world) ⇒ Object private
Methods inherited from Mutant::License::Subscription
Class Method Details
.from_json(value) ⇒ Object
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.
48 49 50 |
# File 'lib/mutant/license/subscription/commercial.rb', line 48 def self.from_json(value) new(licensed: value.fetch('authors').to_set { |email| Author.new(email: email) }) end |
Instance Method Details
#call(world) ⇒ Object
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.
52 53 54 55 56 57 58 59 60 |
# File 'lib/mutant/license/subscription/commercial.rb', line 52 def call(world) candidates = candidates(world) if (licensed & candidates).any? success else failure(licensed, candidates) end end |