Class: Aleph::Base
- Inherits:
-
Object
- Object
- Aleph::Base
- Defined in:
- lib/armstrong.rb,
lib/armstrong/main_actors.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.conn ⇒ Object
Returns the value of attribute conn.
-
.container_proc ⇒ Object
Returns the value of attribute container_proc.
-
.replier ⇒ Object
Returns the value of attribute replier.
-
.replier_proc ⇒ Object
Returns the value of attribute replier_proc.
-
.request_handler ⇒ Object
Returns the value of attribute request_handler.
-
.request_handler_proc ⇒ Object
Returns the value of attribute request_handler_proc.
-
.routes ⇒ Object
Returns the value of attribute routes.
-
.supervisor ⇒ Object
Returns the value of attribute supervisor.
-
.supervisor_proc ⇒ Object
Returns the value of attribute supervisor_proc.
Class Method Summary collapse
- .delete(path, &block) ⇒ Object
- .get(path, &block) ⇒ Object
- .head(path, &block) ⇒ Object
- .new_uuid ⇒ Object
- .patch(path, &block) ⇒ Object
- .post(path, &block) ⇒ Object
- .put(path, &block) ⇒ Object
- .route(verb, path, &block) ⇒ Object
Class Attribute Details
.conn ⇒ Object
Returns the value of attribute conn.
17 18 19 |
# File 'lib/armstrong.rb', line 17 def conn @conn end |
.container_proc ⇒ Object
Returns the value of attribute container_proc.
5 6 7 |
# File 'lib/armstrong/main_actors.rb', line 5 def container_proc @container_proc end |
.replier ⇒ Object
Returns the value of attribute replier.
4 5 6 |
# File 'lib/armstrong/main_actors.rb', line 4 def replier @replier end |
.replier_proc ⇒ Object
Returns the value of attribute replier_proc.
5 6 7 |
# File 'lib/armstrong/main_actors.rb', line 5 def replier_proc @replier_proc end |
.request_handler ⇒ Object
Returns the value of attribute request_handler.
4 5 6 |
# File 'lib/armstrong/main_actors.rb', line 4 def request_handler @request_handler end |
.request_handler_proc ⇒ Object
Returns the value of attribute request_handler_proc.
5 6 7 |
# File 'lib/armstrong/main_actors.rb', line 5 def request_handler_proc @request_handler_proc end |
.routes ⇒ Object
Returns the value of attribute routes.
17 18 19 |
# File 'lib/armstrong.rb', line 17 def routes @routes end |
.supervisor ⇒ Object
Returns the value of attribute supervisor.
4 5 6 |
# File 'lib/armstrong/main_actors.rb', line 4 def supervisor @supervisor end |
.supervisor_proc ⇒ Object
Returns the value of attribute supervisor_proc.
5 6 7 |
# File 'lib/armstrong/main_actors.rb', line 5 def supervisor_proc @supervisor_proc end |
Class Method Details
.delete(path, &block) ⇒ Object
36 |
# File 'lib/armstrong.rb', line 36 def delete(path, &block) route "DELETE", path, &block end |
.get(path, &block) ⇒ Object
32 |
# File 'lib/armstrong.rb', line 32 def get(path, &block) route "GET", path, &block end |
.head(path, &block) ⇒ Object
35 |
# File 'lib/armstrong.rb', line 35 def head(path, &block) route "HEAD", path, &block end |
.new_uuid ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/armstrong.rb', line 19 def new_uuid values = [ rand(0x0010000), rand(0x0010000), rand(0x0010000), rand(0x0010000), rand(0x0010000), rand(0x1000000), rand(0x1000000), ] "%04x%04x-%04x-%04x-%04x%06x%06x" % values end |
.patch(path, &block) ⇒ Object
37 |
# File 'lib/armstrong.rb', line 37 def patch(path, &block) route "PATCH", path, &block end |
.post(path, &block) ⇒ Object
34 |
# File 'lib/armstrong.rb', line 34 def post(path, &block) route "POST", path, &block end |
.put(path, &block) ⇒ Object
33 |
# File 'lib/armstrong.rb', line 33 def put(path, &block) route "PUT", path, &block end |
.route(verb, path, &block) ⇒ Object
39 40 41 42 |
# File 'lib/armstrong.rb', line 39 def route(verb, path, &block) @routes ||= {} (@routes[verb] ||= []) << AddRoute.new(compile(path), block) end |