Method: HTTP::Options#to_hash

Defined in:
lib/http/options.rb

#to_hashObject



165
166
167
168
169
170
# File 'lib/http/options.rb', line 165

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