Class: Mutant::Usage Private

Inherits:
Object
  • Object
show all
Includes:
Unparser::Adamantium
Defined in:
lib/mutant/usage.rb

Overview

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.

API:

  • private

Direct Known Subclasses

Commercial, Opensource, Unknown

Defined Under Namespace

Classes: Commercial, Opensource, Unknown

Constant Summary collapse

CLI_REGEXP =

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.

API:

  • private

/\A(?:commercial|opensource)\z/
TRANSFORM =

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.

API:

  • private

Transform::Sequence.new(
  steps: [
    Transform::STRING,
    Transform::Block.capture(:environment_variables, &method(:parse))
  ]
)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.parse(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.

API:

  • private



81
82
83
84
85
86
# File 'lib/mutant/usage.rb', line 81

def self.parse(value)
  {
    'commercial' => Either::Right.new(Commercial.new),
    'opensource' => Either::Right.new(Opensource.new)
  }.fetch(value) { Either::Left.new("Unknown usage option: #{value.inspect}") }
end

Instance Method Details

#merge(_other) ⇒ 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.

API:

  • private



13
# File 'lib/mutant/usage.rb', line 13

def merge(_other) = self

#messageObject

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.

API:

  • private



11
# File 'lib/mutant/usage.rb', line 11

def message = self.class::MESSAGE

#valueObject

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.

API:

  • private



7
# File 'lib/mutant/usage.rb', line 7

def value = self.class::VALUE

#verifyObject

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.

API:

  • private



9
# File 'lib/mutant/usage.rb', line 9

def verify = Either::Right.new(nil)