Class: Cliqr::Config::Base Private

Inherits:
Object
  • Object
show all
Includes:
DSL, Validation
Defined in:
lib/cliqr/config/base.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.

The base configuration setting to build a cli application with its own dsl

Direct Known Subclasses

Event, EventBased

Instance Method Summary collapse

Methods included from Validation

#errors, included, #read_attributes, #valid?, #validate, #validations

Methods included from DSL

included

Instance Method Details

#set_config(name, value, *_args, &block) ⇒ 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.

Set value for an attribute

Parameters:

  • name (Symbol)

    Name of the config parameter

  • value (Object)

    Value for the config parameter

  • block (Proc)

    Function which populates configuration for a sub-attribute

Returns:

  • (Object)

    new attribute’s value



60
61
62
63
# File 'lib/cliqr/config/base.rb', line 60

def set_config(name, value, *_args, &block)
  value = block if block_given?
  handle_config(name, value)
end

#skip_validation?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.

Skip validation if this is true

Returns:

  • (Boolean)


66
67
68
# File 'lib/cliqr/config/base.rb', line 66

def skip_validation?
  false
end