Method: HTTPX::Options#to_hash

Defined in:
lib/httpx/options.rb

#to_hashObject



144
145
146
147
148
149
# File 'lib/httpx/options.rb', line 144

def to_hash
  hash_pairs = self.class
                   .defined_options
                   .flat_map { |opt_name| [opt_name, send(opt_name)] }
  Hash[*hash_pairs]
end