Class: Mutant::Usage Private
- Inherits:
-
Object
- Object
- Mutant::Usage
- Includes:
- Unparser::Adamantium
- Defined in:
- lib/mutant/usage.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.
Direct Known Subclasses
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.
/\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.
Transform::Sequence.new( steps: [ Transform::STRING, Transform::Block.capture(:environment_variables, &method(:parse)) ] )
Class Method Summary collapse
- .parse(value) ⇒ Object private
Instance Method Summary collapse
- #merge(_other) ⇒ Object private
- #message ⇒ Object private
- #value ⇒ Object private
- #verify ⇒ Object private
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.
93 94 95 96 97 98 |
# File 'lib/mutant/usage.rb', line 93 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.
19 20 21 |
# File 'lib/mutant/usage.rb', line 19 def merge(_other) self end |
#message ⇒ 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.
15 16 17 |
# File 'lib/mutant/usage.rb', line 15 def self.class::MESSAGE end |
#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.
7 8 9 |
# File 'lib/mutant/usage.rb', line 7 def value self.class::VALUE end |
#verify ⇒ 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.
11 12 13 |
# File 'lib/mutant/usage.rb', line 11 def verify Either::Right.new(nil) end |