Module: Cliqr::Config Private
- Defined in:
- lib/cliqr/config/base.rb,
lib/cliqr/config/dsl.rb,
lib/cliqr/config/event.rb,
lib/cliqr/config/named.rb,
lib/cliqr/config/shell.rb,
lib/cliqr/config/action.rb,
lib/cliqr/config/option.rb,
lib/cliqr/config/command.rb,
lib/cliqr/config/event_based.rb,
lib/cliqr/config/option_based.rb,
lib/cliqr/config/validation/verifiable.rb,
lib/cliqr/config/validation/validation_set.rb,
lib/cliqr/config/validation/validator_factory.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
A extension for CLI module to group all config classes
Defined Under Namespace
Modules: DSL, Validation Classes: Action, Base, Command, Event, EventBased, Named, Option, OptionBased, Shell
Constant Summary collapse
- UNSET =
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 value to initialize configuration attributes with
Object.new
- ENABLE_CONFIG =
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.
Configuration option to enable arguments for a command (default)
:enable
- DISABLE_CONFIG =
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.
Configuration option to disable arguments for a command
:disable
- ANY_ARGUMENT_TYPE =
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.
Option type for regular options
:any
- NUMERIC_ARGUMENT_TYPE =
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.
Option type for numeric arguments
:numeric
- BOOLEAN_ARGUMENT_TYPE =
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.
Option type for boolean arguments
:boolean
- ARGUMENT_DEFAULTS =
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 values based on argument type
{ NUMERIC_ARGUMENT_TYPE => 0, BOOLEAN_ARGUMENT_TYPE => false, ANY_ARGUMENT_TYPE => nil }
Class Method Summary collapse
-
.get_if_unset(attribute_value, default_value) ⇒ Object
private
Get the passed param value if current attribute is unset.
Class Method Details
.get_if_unset(attribute_value, default_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.
Get the passed param value if current attribute is unset
39 40 41 42 43 44 45 46 |
# File 'lib/cliqr/config/base.rb', line 39 def self.get_if_unset(attribute_value, default_value) return attribute_value unless attribute_value == UNSET if default_value.is_a?(Proc) default_value.call else default_value end end |