Module: Shaf::ResourceUris
- Defined in:
- lib/shaf/extensions/resource_uris.rb
Instance Method Summary collapse
Instance Method Details
#register_uri(name, uri) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/shaf/extensions/resource_uris.rb', line 10 def register_uri(name, uri) if UriHelper.respond_to? MethodBuilder.method_name(name) raise "resource uri #{name} can't be registered. Method already exist!" end method_string = MethodBuilder.as_string(name, uri) UriHelperMethods.eval_method(method_string) end |
#resource_uris_for(*args) ⇒ Object
5 6 7 8 |
# File 'lib/shaf/extensions/resource_uris.rb', line 5 def resource_uris_for(*args) CreateUriMethods.new(*args).call include UriHelper end |