Class: Jeanine::PathProxy
- Inherits:
-
Object
- Object
- Jeanine::PathProxy
- Defined in:
- lib/jeanine/path_proxy.rb
Instance Method Summary collapse
- #after(*paths, &block) ⇒ Object
- #before(*paths, &block) ⇒ Object
- #delete(path = nil, options = {}, &block) ⇒ Object
- #get(path = nil, options = {}, &block) ⇒ Object
- #head(path = nil, options = {}, &block) ⇒ Object
-
#initialize(context, pathname, options = {}) ⇒ PathProxy
constructor
A new instance of PathProxy.
- #match(path = nil, options = {}, &block) ⇒ Object
- #options(path = nil, options = {}, &block) ⇒ Object
- #patch(path = nil, options = {}, &block) ⇒ Object
- #path(path = nil, options = {}, &block) ⇒ Object
- #post(path = nil, options = {}, &block) ⇒ Object
- #put(path = nil, options = {}, &block) ⇒ Object
- #root(path = '/', options = {}, &block) ⇒ Object
Constructor Details
#initialize(context, pathname, options = {}) ⇒ PathProxy
Returns a new instance of PathProxy.
3 4 5 6 7 |
# File 'lib/jeanine/path_proxy.rb', line 3 def initialize(context, pathname, = {}) @context = context @pathname = pathname @options = end |
Instance Method Details
#after(*paths, &block) ⇒ Object
63 64 65 |
# File 'lib/jeanine/path_proxy.rb', line 63 def after(*paths, &block) @context.after(*paths, &block) end |
#before(*paths, &block) ⇒ Object
59 60 61 |
# File 'lib/jeanine/path_proxy.rb', line 59 def before(*paths, &block) @context.before(*paths, &block) end |
#delete(path = nil, options = {}, &block) ⇒ Object
39 40 41 42 |
# File 'lib/jeanine/path_proxy.rb', line 39 def delete(path = nil, = {}, &block) @options.reverse_merge!() @context.delete(merged_path(path), , &block) end |
#get(path = nil, options = {}, &block) ⇒ Object
9 10 11 12 |
# File 'lib/jeanine/path_proxy.rb', line 9 def get(path = nil, = {}, &block) @options.reverse_merge!() @context.get(merged_path(path), , &block) end |
#head(path = nil, options = {}, &block) ⇒ Object
34 35 36 37 |
# File 'lib/jeanine/path_proxy.rb', line 34 def head(path = nil, = {}, &block) @options.reverse_merge!() @context.head(merged_path(path), , &block) end |
#match(path = nil, options = {}, &block) ⇒ Object
49 50 51 52 |
# File 'lib/jeanine/path_proxy.rb', line 49 def match(path = nil, = {}, &block) @options.reverse_merge!() @context.match(merged_path(path), , &block) end |
#options(path = nil, options = {}, &block) ⇒ Object
29 30 31 32 |
# File 'lib/jeanine/path_proxy.rb', line 29 def (path = nil, = {}, &block) @options.reverse_merge!() @context.(merged_path(path), , &block) end |
#patch(path = nil, options = {}, &block) ⇒ Object
19 20 21 22 |
# File 'lib/jeanine/path_proxy.rb', line 19 def patch(path = nil, = {}, &block) @options.reverse_merge!() @context.patch(merged_path(path), , &block) end |
#path(path = nil, options = {}, &block) ⇒ Object
44 45 46 47 |
# File 'lib/jeanine/path_proxy.rb', line 44 def path(path = nil, = {}, &block) @options.reverse_merge!() @context.path(merged_path(path), , &block) end |
#post(path = nil, options = {}, &block) ⇒ Object
14 15 16 17 |
# File 'lib/jeanine/path_proxy.rb', line 14 def post(path = nil, = {}, &block) @options.reverse_merge!() @context.post(merged_path(path), , &block) end |
#put(path = nil, options = {}, &block) ⇒ Object
24 25 26 27 |
# File 'lib/jeanine/path_proxy.rb', line 24 def put(path = nil, = {}, &block) @options.reverse_merge!() @context.put(merged_path(path), , &block) end |