Class: Mugen::Client
Class Method Summary
collapse
Class Method Details
.before_get(path, options) ⇒ Object
12
13
14
15
|
# File 'lib/mugen/client.rb', line 12
def self.before_get(path, options)
options[:query] = Mugen.set_params(options[:query]) if options.has_key? :query
[path, options]
end
|
.before_post(path, options) ⇒ Object
17
18
19
20
|
# File 'lib/mugen/client.rb', line 17
def self.before_post(path, options)
options[:body] = Mugen.set_params(options[:body], :post) if options.has_key? :body
[path, options]
end
|
.before_put(path, options) ⇒ Object
22
23
24
25
|
# File 'lib/mugen/client.rb', line 22
def self.before_put(path, options)
options[:body] = Mugen.set_params(options[:body], :post) if options.has_key? :body
[path, options]
end
|
.check_for_errors(res) ⇒ Object
27
28
29
30
31
|
# File 'lib/mugen/client.rb', line 27
def self.check_for_errors(res)
if res['opstat'] != 'ok' && res['err']
Mugen.errors << res['err']['msg']
end
end
|