Class: Nl::RawSubMessage

Inherits:
SubMessage show all
Defined in:
nl/lib/nl/sub_message.rb

Overview

An unrecognized selector-specific payload retained without interpretation.

Instance Attribute Summary collapse

Attributes included from StructuredPayload

#attributes, #fixed_header

Instance Method Summary collapse

Constructor Details

#initialize(payload, nlattr_type_flags:) ⇒ RawSubMessage

Returns a new instance of RawSubMessage.



85
86
87
88
# File 'nl/lib/nl/sub_message.rb', line 85

def initialize(payload, nlattr_type_flags:)
  @payload = payload
  @nlattr_type_flags = nlattr_type_flags
end

Instance Attribute Details

#nlattr_type_flags ⇒ Object (readonly)

Returns the value of attribute nlattr_type_flags.



83
84
85
# File 'nl/lib/nl/sub_message.rb', line 83

def nlattr_type_flags
  @nlattr_type_flags
end

#payload ⇒ Object (readonly)

Returns the value of attribute payload.



83
84
85
# File 'nl/lib/nl/sub_message.rb', line 83

def payload
  @payload
end

Instance Method Details

#encode(encoder, external_selectors: []) ⇒ Object



90
91
92
# File 'nl/lib/nl/sub_message.rb', line 90

def encode(encoder, external_selectors: [])
  encoder.put_string(payload)
end