Class: SecureKeys::Core::Console::Argument::Handler

Inherits:
Object
  • Object
show all
Extended by:
Fetchable
Defined in:
lib/core/console/arguments/handler.rb

Class Attribute Summary collapse

Class Method Summary collapse

Methods included from Fetchable

fetch, set

Class Attribute Details

.argumentsObject (readonly)

Returns the value of attribute arguments.



11
12
13
# File 'lib/core/console/arguments/handler.rb', line 11

def arguments
  @arguments
end

Class Method Details

.deep_merge(key:, value:) ⇒ Object

Append a hash value into a nested key, initialising it when absent

Parameters:

  • key (Symbol)

    the argument key

  • value (Hash)

    the hash to merge in



26
27
28
29
# File 'lib/core/console/arguments/handler.rb', line 26

def self.deep_merge(key:, value:)
  @arguments[key.to_sym] ||= {}
  @arguments[key.to_sym].merge!(value)
end