lib/cli/mastermind/configuration.rb
# Add arbitrary configuration attributes to the configuration object.
# Use this to add plan specific configuration options.
#
# @overload configure(attribute, value=nil, &block)
#   @example configure(:foo, 'bar')
#   @example configure(:foo) { 'bar' }
#   @param attribute [String,Symbol] the attribute to define
#   @param value [] the value to assign
#   @param block [#call,nil] a callable that will return the value
#
# @overload configure(attribute)
#   @example configure(foo: 'bar')
#   @example configure('foo' => -> { 'bar' } # not recommended, but should work
#   @param attribute [Hash] a single entry hash with the key as the attribute
#     name and value as the corresponding value
Add arbitrary configuration attributes to the configuration object.
Use this to add plan specific configuration options.
Add arbitrary configuration attributes to the configuration object . Use this to add plan specific configuration options .
def configure(attribute, value=nil, &block)
          attribute, value = attribute.first if attribute.is_a? Hash
          Configuration.add_attribute(attribute)
          @config.public_send "#{attribute}=", value, &block
        end
def configure ( attribute , value = nil , & block ) attribute , value = attribute . first if attribute . is_a? Hash Configuration . add_attribute ( attribute ) @config . public_send "#{attribute}=" , value , & block end
Add arbitrary configuration attributes to the configuration object.
Add arbitrary configuration attributes to the configuration object .
attribute
<not_specific>
value
<not_specific>
block
<not_specific>
overload
configure(attribute, value=nil, █) @example configure(:foo, 'bar') @example configure(:foo) { 'bar' } @param attribute [String,Symbol] the attribute to define @param value [] the value to assign @param block [#call,nil] a callable that will return the value
configure ( attribute value = nil █ ) @example configure ( : foo ' bar ' ) @example configure ( : foo ) { ' bar ' } @param attribute [ String Symbol ] the attribute to define @param value [] the value to assign @param block [ #call nil ] a callable that will return the value
overload
configure(attribute) @example configure(foo: 'bar') @example configure('foo' => -> { 'bar' } # not recommended, but should work @param attribute [Hash] a single entry hash with the key as the attribute name and value as the corresponding value
configure ( attribute ) @example configure ( foo : ' bar ' ) @example configure ( ' foo ' = > - > { ' bar ' } # not recommended but should work @param attribute [ Hash ] a single entry hash with the key as the attribute name and value as the corresponding value