Class: TestsDoc::Interaction

Inherits:
Struct
  • Object
show all
Defined in:
lib/tests_doc/interaction.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#exampleObject

Returns the value of attribute example

Returns:

  • (Object)

    the current value of example



5
6
7
# File 'lib/tests_doc/interaction.rb', line 5

def example
  @example
end

#optionsObject

Returns the value of attribute options

Returns:

  • (Object)

    the current value of options



5
6
7
# File 'lib/tests_doc/interaction.rb', line 5

def options
  @options
end

#requestObject

Returns the value of attribute request

Returns:

  • (Object)

    the current value of request



5
6
7
# File 'lib/tests_doc/interaction.rb', line 5

def request
  @request
end

#responseObject

Returns the value of attribute response

Returns:

  • (Object)

    the current value of response



5
6
7
# File 'lib/tests_doc/interaction.rb', line 5

def response
  @response
end

Instance Method Details

#recordObject



7
8
9
10
11
# File 'lib/tests_doc/interaction.rb', line 7

def record
  return if response.code.to_s == "500"

  TestsDoc::File.new(file_path, output, options).write_if_changed
end