Class: RedSnow::Sourcemap::TransactionExample
- Defined in:
- lib/redsnow/sourcemap.rb
Overview
Transaction example source map node
Instance Attribute Summary collapse
-
#requests ⇒ Array<Request>
example request payloads.
-
#response ⇒ Array<Response>
example response payloads.
-
#responses ⇒ Object
Returns the value of attribute responses.
Attributes inherited from NamedNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(sourcemap) ⇒ TransactionExample
constructor
A new instance of TransactionExample.
Constructor Details
#initialize(sourcemap) ⇒ TransactionExample
Returns a new instance of TransactionExample.
152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/redsnow/sourcemap.rb', line 152 def initialize(sourcemap) super(sourcemap) @requests = [] sourcemap.key?('requests') && sourcemap['requests'].each do |request| @requests << Payload.new(request) end @responses = [] sourcemap.key?('responses') && sourcemap['responses'].each do |response| @responses << Payload.new(response) end end |
Instance Attribute Details
#requests ⇒ Array<Request>
example request payloads
147 148 149 |
# File 'lib/redsnow/sourcemap.rb', line 147 def requests @requests end |
#response ⇒ Array<Response>
example response payloads
147 148 149 |
# File 'lib/redsnow/sourcemap.rb', line 147 def response @response end |
#responses ⇒ Object
Returns the value of attribute responses.
149 150 151 |
# File 'lib/redsnow/sourcemap.rb', line 149 def responses @responses end |