Class: Mutant::License::Subscription::Commercial Private
- Inherits:
-
Mutant::License::Subscription
- Object
- Mutant::License::Subscription
- Mutant::License::Subscription::Commercial
- 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
Constants inherited from Mutant::License::Subscription
Class Method Summary collapse
- .from_json(value) ⇒ Object private
Instance Method Summary collapse
- #apply(world) ⇒ Object private
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.
16 17 18 |
# File 'lib/mutant/license/subscription/commercial.rb', line 16 def self.from_json(value) new(value.fetch('authors').map(&Author.method(:new)).to_set) end |
Instance Method Details
#apply(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.
20 21 22 23 24 25 26 27 28 |
# File 'lib/mutant/license/subscription/commercial.rb', line 20 def apply(world) candidates = candidates(world) if ( & candidates).any? success else failure(, candidates) end end |