Class: RedSnow::Payload Abstract
- Inherits:
-
NamedBlueprintNode
- Object
- BlueprintNode
- NamedBlueprintNode
- RedSnow::Payload
- Defined in:
- lib/redsnow/blueprint.rb
Overview
This class is abstract.
HTTP message payload Blueprint AST node
base class for 'payload sections'
Instance Attribute Summary collapse
-
#body ⇒ String
HTTP-message body or nil.
-
#headers ⇒ Array<Headers>
array of HTTP header fields of the message or nil.
-
#parameters ⇒ Array
ignored.
-
#schema ⇒ String
HTTP-message body validation schema or nil.
Attributes inherited from NamedBlueprintNode
Instance Method Summary collapse
-
#initialize(sc_payload_handle_resource) ⇒ Payload
constructor
A new instance of Payload.
Methods inherited from NamedBlueprintNode
Constructor Details
#initialize(sc_payload_handle_resource) ⇒ Payload
208 209 210 211 212 213 214 215 216 |
# File 'lib/redsnow/blueprint.rb', line 208 def initialize(sc_payload_handle_resource) @name = RedSnow::Binding.sc_payload_name(sc_payload_handle_resource) @description = RedSnow::Binding.sc_payload_description(sc_payload_handle_resource) @body = RedSnow::Binding.sc_payload_body(sc_payload_handle_resource) @schema = RedSnow::Binding.sc_payload_schema(sc_payload_handle_resource) sc_header_collection_handle_payload = RedSnow::Binding.sc_header_collection_handle_payload(sc_payload_handle_resource) @headers = Headers.new(sc_header_collection_handle_payload) end |
Instance Attribute Details
#body ⇒ String
HTTP-message body or nil
200 201 202 |
# File 'lib/redsnow/blueprint.rb', line 200 def body @body end |
#headers ⇒ Array<Headers>
array of HTTP header fields of the message or nil
200 201 202 |
# File 'lib/redsnow/blueprint.rb', line 200 def headers @headers end |
#parameters ⇒ Array
ignored
200 201 202 |
# File 'lib/redsnow/blueprint.rb', line 200 def parameters @parameters end |
#schema ⇒ String
HTTP-message body validation schema or nil
200 201 202 |
# File 'lib/redsnow/blueprint.rb', line 200 def schema @schema end |