Module: Panda::Router
- Included in:
- Base
- Defined in:
- lib/panda/modules/router.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- DEFAULT_FORMAT =
"json"
- VAR_PATTERN =
/:\w+/
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
6 7 8 |
# File 'lib/panda/modules/router.rb', line 6 def self.included(base) base.extend(ClassMethods) end |
Instance Method Details
#object_url_map(url) ⇒ Object
50 51 52 |
# File 'lib/panda/modules/router.rb', line 50 def object_url_map(url) self.class.full_object_url(url.clone.gsub(VAR_PATTERN) {|key| send(key[1..-1].to_sym)}) end |