lib/soaspec/exchange_handlers/exchange_handler.rb in soaspec-0.0.41 vs lib/soaspec/exchange_handlers/exchange_handler.rb in soaspec-0.0.42
- old
+ new
@@ -9,16 +9,24 @@
# Set instance variable name
# @param [String, Symbol] name Name used when describing API test
# @param [Hash] options Parameters defining handler. Used in descendants
def initialize(name, options)
+ use
@name = name
end
+ # Set Api handler used by Exchange class to this handler
+ # @return [Self]
+ def use
+ Soaspec.api_handler = self
+ self
+ end
+
# Sets api handler variable globally. This is used in 'Exchange' class
# @return [String] Name set upon initialisation
def to_s
- Soaspec.api_handler = self
+ use
@name.to_s
end
# Set the request option type and the template name
# @param [String] name Name of file inside 'template' folder excluding extension
\ No newline at end of file