Class: Faraday::ProxyOptions

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/faraday/options.rb

Class Method Summary collapse

Class Method Details

.from(value) ⇒ Object



232
233
234
235
236
237
238
239
240
241
242
243
244
# File 'lib/faraday/options.rb', line 232

def self.from(value)
  case value
  when String
    value = {:uri => Utils.URI(value)}
  when URI
    value = {:uri => value}
  when Hash, Options
    if uri = value.delete(:uri)
      value[:uri] = Utils.URI(uri)
    end
  end
  super(value)
end