Class: SmartyStreets::URLPrefixSender
- Inherits:
-
Object
- Object
- SmartyStreets::URLPrefixSender
- Defined in:
- lib/smartystreets_ruby_sdk/url_prefix_sender.rb
Instance Method Summary collapse
-
#initialize(url_prefix, inner) ⇒ URLPrefixSender
constructor
A new instance of URLPrefixSender.
- #send(request) ⇒ Object
Constructor Details
#initialize(url_prefix, inner) ⇒ URLPrefixSender
Returns a new instance of URLPrefixSender.
3 4 5 6 |
# File 'lib/smartystreets_ruby_sdk/url_prefix_sender.rb', line 3 def initialize(url_prefix, inner) @url_prefix = url_prefix @inner = inner end |
Instance Method Details
#send(request) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/smartystreets_ruby_sdk/url_prefix_sender.rb', line 8 def send(request) if request.url_components.nil? request.url_prefix = @url_prefix else request.url_prefix = @url_prefix + request.url_components end @inner.send(request) end |