lib/soaspec/exchange/exchange_extractor.rb in soaspec-0.2.29 vs lib/soaspec/exchange/exchange_extractor.rb in soaspec-0.2.30
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
module Soaspec
# Methods for extracting aspects of the traffic for a request / response
# in an exchange from the ExchangeHandler that it's tied to
module ExchangeExtractor
# Request of API call. Either intended request or actual request
@@ -30,10 +32,10 @@
# @return [String] Value at path
def [](path)
exchange_handler.value_from_path(response, path.to_s)
end
- alias_method :value_from_path, :[]
+ alias value_from_path []
# Using same path syntax as []. Returns true of false depending on whether an element is found
# @return [Boolean] Whether an element exists at the path
def element?(path)
self[path]