Method: ChainOptions::Option#to_h

Defined in:
lib/chain_options/option.rb

#to_hObject

Looks through the parameters and returns the non-nil values as a hash



75
76
77
78
79
80
81
# File 'lib/chain_options/option.rb', line 75

def to_h
  PARAMETERS.each_with_object({}) do |param, hash|
    next if send(param).nil?

    hash[param] = send(param)
  end
end