class Strut::InteractionFactory
Public Instance Methods
extension?(tag)
click to toggle source
# File lib/strut/interaction_factory.rb, line 21 def extension?(tag) tag =~ /^x-/ end
make_interaction(path_stack)
click to toggle source
# File lib/strut/interaction_factory.rb, line 5 def make_interaction(path_stack) interaction = Interaction.new if path_stack[0] == "paths" interaction.uri = path_stack[1] unless extension?(path_stack[1]) end interaction.method = path_stack[2] unless extension?(path_stack[2]) if path_stack[3] == "responses" interaction.statusCode = path_stack[4] unless extension?(path_stack[4]) end interaction end