Class: Sourced::Message::Payload

Inherits:
Plumb::Types::Data
  • Object
show all
Defined in:
lib/sourced/message.rb

Overview

Base class for typed message payloads.

Instance Method Summary collapse

Instance Method Details

#[](key) ⇒ Object

Returns attribute value.

Parameters:

  • key (Symbol)

    attribute name

Returns:

  • (Object)

    attribute value



115
# File 'lib/sourced/message.rb', line 115

def [](key) = attributes[key]

#fetchObject

See Also:

  • Hash#fetch


118
# File 'lib/sourced/message.rb', line 118

def fetch(...) = to_h.fetch(...)