Module: Jarvis
- Includes:
- ActiveSupport::Configurable, HTTParty
- Defined in:
- lib/jarvis.rb,
lib/jarvis/cli.rb,
lib/jarvis/server.rb,
lib/jarvis/service.rb,
lib/jarvis/version.rb,
lib/jarvis/exceptions.rb,
lib/jarvis/interpreter.rb,
lib/jarvis/api/response.rb,
lib/jarvis/test_support/test_support.rb
Defined Under Namespace
Modules: API, TestSupport
Classes: CLI, Exception, Interpreter, Server, Service, ThirdPartyAPIFailure, UnfitEnvironmentException
Constant Summary
collapse
- VERSION =
"0.1.0"
Class Attribute Summary collapse
Class Method Summary
collapse
-
.clear_services ⇒ Object
-
.decode_uri(str) ⇒ Object
-
.delete(path, options = {}, &block) ⇒ Object
-
.encode_uri(str) ⇒ Object
-
.get(path, options = {}, &block) ⇒ Object
-
.patch(path, options = {}, &block) ⇒ Object
-
.post(path, options = {}, &block) ⇒ Object
-
.put(path, options = {}, &block) ⇒ Object
-
.register_services(*args) ⇒ Object
Class Attribute Details
.services ⇒ Object
Returns the value of attribute services.
25
26
27
|
# File 'lib/jarvis.rb', line 25
def services
@services
end
|
Class Method Details
.clear_services ⇒ Object
35
36
37
|
# File 'lib/jarvis.rb', line 35
def clear_services
@services = []
end
|
.decode_uri(str) ⇒ Object
64
65
66
|
# File 'lib/jarvis.rb', line 64
def decode_uri(str)
URI.decode(str)
end
|
.delete(path, options = {}, &block) ⇒ Object
56
57
58
|
# File 'lib/jarvis.rb', line 56
def delete(path, options={}, &block)
Jarvis::API::Response.new HTTParty.delete(path, options, &block)
end
|
.encode_uri(str) ⇒ Object
60
61
62
|
# File 'lib/jarvis.rb', line 60
def encode_uri(str)
URI.encode(str)
end
|
.get(path, options = {}, &block) ⇒ Object
40
41
42
|
# File 'lib/jarvis.rb', line 40
def get(path, options={}, &block)
Jarvis::API::Response.new HTTParty.get(path, options, &block)
end
|
.patch(path, options = {}, &block) ⇒ Object
48
49
50
|
# File 'lib/jarvis.rb', line 48
def patch(path, options={}, &block)
Jarvis::API::Response.new HTTParty.patch(path, options, &block)
end
|
.post(path, options = {}, &block) ⇒ Object
44
45
46
|
# File 'lib/jarvis.rb', line 44
def post(path, options={}, &block)
Jarvis::API::Response.new HTTParty.post(path, options, &block)
end
|
.put(path, options = {}, &block) ⇒ Object
52
53
54
|
# File 'lib/jarvis.rb', line 52
def put(path, options={}, &block)
Jarvis::API::Response.new HTTParty.put(path, options, &block)
end
|
.register_services(*args) ⇒ Object
30
31
32
33
|
# File 'lib/jarvis.rb', line 30
def register_services(*args)
args.each { |klass| services << klass}
Jarvis::Interpreter.build_determine_service
end
|