Class: Aleph::Base
- Inherits:
-
Object
- Object
- Aleph::Base
- Defined in:
- lib/angstrom.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.conn ⇒ Object
Returns the value of attribute conn.
-
.routes ⇒ Object
Returns the value of attribute routes.
Class Method Summary collapse
- .delete(path, &block) ⇒ Object
- .get(path, &block) ⇒ Object
- .head(path, &block) ⇒ 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.
15 16 17 |
# File 'lib/angstrom.rb', line 15 def conn @conn end |
.routes ⇒ Object
Returns the value of attribute routes.
15 16 17 |
# File 'lib/angstrom.rb', line 15 def routes @routes end |
Class Method Details
.delete(path, &block) ⇒ Object
21 |
# File 'lib/angstrom.rb', line 21 def delete(path, &block) route "DELETE", path, &block end |
.get(path, &block) ⇒ Object
17 |
# File 'lib/angstrom.rb', line 17 def get(path, &block) route "GET", path, &block end |
.head(path, &block) ⇒ Object
20 |
# File 'lib/angstrom.rb', line 20 def head(path, &block) route "HEAD", path, &block end |
.patch(path, &block) ⇒ Object
22 |
# File 'lib/angstrom.rb', line 22 def patch(path, &block) route "PATCH", path, &block end |
.post(path, &block) ⇒ Object
19 |
# File 'lib/angstrom.rb', line 19 def post(path, &block) route "POST", path, &block end |
.put(path, &block) ⇒ Object
18 |
# File 'lib/angstrom.rb', line 18 def put(path, &block) route "PUT", path, &block end |
.route(verb, path, &block) ⇒ Object
24 25 26 27 |
# File 'lib/angstrom.rb', line 24 def route(verb, path, &block) @routes ||= {} (@routes[verb] ||= []) << AddRoute.new(compile(path), block) end |