Class: Cliqr::Command::ArgumentOperator Private
- Inherits:
-
Object
- Object
- Cliqr::Command::ArgumentOperator
- Defined in:
- lib/cliqr/command/argument_operator.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.
Operates on the value of a argument after it has been validated
Direct Known Subclasses
Constant Summary collapse
- DEFAULT_ARGUMENT_OPERATOR =
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.
Default pass through argument operator
ArgumentOperator.new
Class Method Summary collapse
-
.for_type(type) ⇒ Cliqr::CLI::ArgumentOperator
private
Get a new ArgumentOperator for a argument type.
Instance Method Summary collapse
-
#operate(value) ⇒ String
private
Return the same value back without any change.
Class Method Details
.for_type(type) ⇒ Cliqr::CLI::ArgumentOperator
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.
Get a new ArgumentOperator for a argument type
15 16 17 18 19 20 21 22 |
# File 'lib/cliqr/command/argument_operator.rb', line 15 def self.for_type(type) case type when Config::NUMERIC_ARGUMENT_TYPE NumericArgumentOperator.new else DEFAULT_ARGUMENT_OPERATOR end end |
Instance Method Details
#operate(value) ⇒ String
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.
Return the same value back without any change
27 28 29 |
# File 'lib/cliqr/command/argument_operator.rb', line 27 def operate(value) value end |