Class: ApiValve::Forwarder::LocationConverter
- Inherits:
-
Object
- Object
- ApiValve::Forwarder::LocationConverter
- Defined in:
- lib/api_valve/forwarder/location_converter.rb
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(location, options) ⇒ LocationConverter
constructor
A new instance of LocationConverter.
Constructor Details
#initialize(location, options) ⇒ LocationConverter
Returns a new instance of LocationConverter.
3 4 5 6 |
# File 'lib/api_valve/forwarder/location_converter.rb', line 3 def initialize(location, ) @location = location @options = end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/api_valve/forwarder/location_converter.rb', line 8 def call if other_host? || same_prefix? @location.to_s else convert_location end end |