Class: RSpec::DocumentRequests::Writers::Markdown::Response

Inherits:
Base::Response
  • Object
show all
Includes:
ParametersTable
Defined in:
lib/rspec/document_requests/writers/markdown.rb

Instance Method Summary collapse

Methods inherited from Base::Response

#close, #initialize

Constructor Details

This class inherits a constructor from RSpec::DocumentRequests::Writers::Base::Response

Instance Method Details

#body(body) ⇒ Object



114
115
116
117
118
119
# File 'lib/rspec/document_requests/writers/markdown.rb', line 114

def body(body)
  @file.puts "#### Body"
  @file.puts
  @file.puts "    #{body}"
  @file.puts
end

#content_type(content_type) ⇒ Object



101
102
103
104
105
106
# File 'lib/rspec/document_requests/writers/markdown.rb', line 101

def content_type(content_type)
  @file.puts "#### Content-Type"
  @file.puts
  @file.puts "    #{content_type}"
  @file.puts
end

#headers(headers) ⇒ Object



121
122
123
124
125
# File 'lib/rspec/document_requests/writers/markdown.rb', line 121

def headers(headers)
  @file.puts "#### Headers"
  @file.puts
  parameters_table(headers)
end

#parameters(parameters) ⇒ Object



108
109
110
111
112
# File 'lib/rspec/document_requests/writers/markdown.rb', line 108

def parameters(parameters)
  @file.puts "#### Parameters"
  @file.puts
  parameters_table(parameters)
end

#status(status, message) ⇒ Object



94
95
96
97
98
99
# File 'lib/rspec/document_requests/writers/markdown.rb', line 94

def status(status, message)
  @file.puts "#### Status"
  @file.puts
  @file.puts "    #{status} #{message}"
  @file.puts
end

#title(message) ⇒ Object



89
90
91
92
# File 'lib/rspec/document_requests/writers/markdown.rb', line 89

def title(message)
  @file.puts "### Response#{" (#{message})" if message}"
  @file.puts
end