Class: RedSnow::Sourcemap::Payload Abstract
- Defined in:
- lib/redsnow/sourcemap.rb
Overview
This class is abstract.
Payload source map node
Instance Attribute Summary collapse
-
#body ⇒ Sourcemap
HTTP-message body or nil.
-
#headers ⇒ Headers
array of HTTP header fields of the message or nil.
-
#parameters ⇒ Parameters
ignored.
-
#reference ⇒ Sourcemap
Symbol Reference sourcemap if the payload is a reference.
-
#schema ⇒ Sourcemap
HTTP-message body validation schema or nil.
Attributes inherited from NamedNode
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(sourcemap) ⇒ Payload
constructor
A new instance of Payload.
Constructor Details
#initialize(sourcemap) ⇒ Payload
Returns a new instance of Payload.
131 132 133 134 135 136 137 138 139 140 |
# File 'lib/redsnow/sourcemap.rb', line 131 def initialize(sourcemap) return if sourcemap.nil? super(sourcemap) @body = SourceMap.new(sourcemap['body']) @schema = SourceMap.new(sourcemap['schema']) @reference = SourceMap.new(sourcemap['reference']) @headers = Headers.new(sourcemap['headers']) end |
Instance Attribute Details
#body ⇒ Sourcemap
HTTP-message body or nil
124 125 126 |
# File 'lib/redsnow/sourcemap.rb', line 124 def body @body end |
#headers ⇒ Headers
array of HTTP header fields of the message or nil
124 125 126 |
# File 'lib/redsnow/sourcemap.rb', line 124 def headers @headers end |
#parameters ⇒ Parameters
ignored
124 125 126 |
# File 'lib/redsnow/sourcemap.rb', line 124 def parameters @parameters end |
#reference ⇒ Sourcemap
Symbol Reference sourcemap if the payload is a reference
124 125 126 |
# File 'lib/redsnow/sourcemap.rb', line 124 def reference @reference end |
#schema ⇒ Sourcemap
HTTP-message body validation schema or nil
124 125 126 |
# File 'lib/redsnow/sourcemap.rb', line 124 def schema @schema end |