Class: Mutant::License::Subscription::Opensource Private

Inherits:
Mutant::License::Subscription show all
Defined in:
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.

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.

'opensource repository'

Constants inherited from Mutant::License::Subscription

FAILURE_FORMAT, FORMAT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Mutant::License::Subscription

#description, load

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.



9
10
11
# File 'lib/mutant/license/subscription/opensource.rb', line 9

def self.from_json(value)
  new(licensed: value.fetch('repositories').map(&Repository.public_method(:parse)).to_set)
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.



13
14
15
# File 'lib/mutant/license/subscription/opensource.rb', line 13

def call(world)
  Repository.load_from_git(world).bind(&method(:check_subscription))
end