3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/foaas/f_o.rb', line 3
def initialize(options = {})
options = {
resource: 'off',
name: nil,
from: 'me',
root_url: 'http://foaas.herokuapp.com',
http_headers: {
"Accept" => "application/json",
}
}.merge(options)
options.merge!({
uri: [
options[:root_url],
options[:resource],
options[:name],
options[:from]
].compact.join("/")
})
[:root_url, :resource, :name, :from].map do |o|
options.delete o
end
load_options(:uri, :http_headers, options)
end
|