Class: Sinclair::InputHash
Overview
Class responsible to convert inputs into hash of default values
Class Method Summary collapse
-
.input_hash(*args) ⇒ Hash
Converts args into Hash.
Instance Method Summary collapse
-
#to_h ⇒ Hahs
private
Returns hash from initialization arguments.
Class Method Details
.input_hash(*args) ⇒ Hash .input_hash(*args, **hash) ⇒ Hash
Converts args into Hash
37 38 39 |
# File 'lib/sinclair/input_hash.rb', line 37 def self.input_hash(*args) new(*args).to_h end |
Instance Method Details
#to_h ⇒ Hahs
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.
Returns hash from initialization arguments
47 48 49 |
# File 'lib/sinclair/input_hash.rb', line 47 def to_h hash_from_attributes.merge!(hash) end |