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



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

def [](key) = attributes[key]

#fetchObject

See Also:

  • Hash#fetch


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

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