Class: Plushie::Event::Async

Inherits:
Data
  • Object
show all
Defined in:
lib/plushie/event.rb,
sig/plushie/event.rbs

Overview

Async command result events. Triggered when a Command.async lambda completes execution.

Examples:

Async result

in Event::Async[tag: :fetch_data, result:]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeAsync

Returns a new instance of Async.

Parameters:

  • tag: (Symbol)
  • result: (Object)


176
# File 'sig/plushie/event.rbs', line 176

def initialize: (tag: Symbol, result: untyped) -> void

Instance Attribute Details

#resultObject (readonly)

Returns the value of attribute result

Returns:

  • (Object)

    the current value of result



352
353
354
# File 'lib/plushie/event.rb', line 352

def result
  @result
end

#result [Object] return value of the async lambda([Object]) ⇒ Object (readonly)

Async command result events. Triggered when a Command.async lambda completes execution.

Examples:

Async result

in Event::Async[tag: :fetch_data, result:]


352
# File 'lib/plushie/event.rb', line 352

Async = Data.define(:tag, :result)

#tagObject (readonly)

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



352
353
354
# File 'lib/plushie/event.rb', line 352

def tag
  @tag
end

#tag [Symbol] the tag specified in Command.async([Symbol]) ⇒ Object (readonly)

Async command result events. Triggered when a Command.async lambda completes execution.

Examples:

Async result

in Event::Async[tag: :fetch_data, result:]


352
# File 'lib/plushie/event.rb', line 352

Async = Data.define(:tag, :result)

Instance Method Details

#withAsync

Parameters:

  • (Object)

Returns:



177
# File 'sig/plushie/event.rbs', line 177

def with: (**untyped) -> Async