Class: AssLauncher::Enterprise::Cli::BinaryMatcher Private

Inherits:
Object
  • Object
show all
Defined in:
lib/ass_launcher/enterprise/cli/binary_matcher.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

ALL_CLIENTS =

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.

[:thick, :thin, :web]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(clients_array = nil, requirement = '>= 0') ⇒ BinaryMatcher

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.

Returns a new instance of BinaryMatcher.



37
38
39
40
# File 'lib/ass_launcher/enterprise/cli/binary_matcher.rb', line 37

def initialize(clients_array = nil, requirement = '>= 0')
  @clients = nil_if_zsize(clients_array) || ALL_CLIENTS
  @requirement = Gem::Requirement.new requirement.to_s
end

Instance Attribute Details

#clientsObject (readonly)

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.



36
37
38
# File 'lib/ass_launcher/enterprise/cli/binary_matcher.rb', line 36

def clients
  @clients
end

#requirementObject

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.



36
37
38
# File 'lib/ass_launcher/enterprise/cli/binary_matcher.rb', line 36

def requirement
  @requirement
end

Class Method Details

.auto(run_modes, requirement = '> 0') ⇒ 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.

Calculate matcher for run_mode



18
19
20
# File 'lib/ass_launcher/enterprise/cli/binary_matcher.rb', line 18

def self.auto(run_modes, requirement = '> 0')
  new auto_client(run_modes), requirement
end

Instance Method Details

#match?(binary_wrapper) ⇒ Boolean

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.

Returns:

  • (Boolean)


53
54
55
# File 'lib/ass_launcher/enterprise/cli/binary_matcher.rb', line 53

def match?(binary_wrapper)
  match_client?(binary_wrapper) && match_version?(binary_wrapper)
end