Class: Service::Client::BoundRoute
- Inherits:
-
Object
- Object
- Service::Client::BoundRoute
- Defined in:
- lib/service-client/bound_route.rb
Instance Method Summary collapse
-
#initialize(route, args) ⇒ BoundRoute
constructor
A new instance of BoundRoute.
- #url_for_method(method) ⇒ Object
Constructor Details
#initialize(route, args) ⇒ BoundRoute
Returns a new instance of BoundRoute.
2 3 4 5 |
# File 'lib/service-client/bound_route.rb', line 2 def initialize(route, args) @route = route @args = args || [] end |
Instance Method Details
#url_for_method(method) ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/service-client/bound_route.rb', line 7 def url_for_method(method) pattern = @route.pattern_for(method) raise Service::Client::RoutingError.new("Method #{method} unsupported!") unless pattern pattern.filled_with((pattern)) end |