Class: Plushie::Event::Stream

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

Overview

Stream command chunk events. Triggered for each value emitted by a Command.stream source.

Examples:

Stream chunk

in Event::Stream[tag: :download, value:]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStream

Returns a new instance of Stream.

Parameters:

  • tag: (Symbol)
  • value: (Object)


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

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

Instance Attribute Details

#tagObject (readonly)

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



362
363
364
# File 'lib/plushie/event.rb', line 362

def tag
  @tag
end

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

Stream command chunk events. Triggered for each value emitted by a Command.stream source.

Examples:

Stream chunk

in Event::Stream[tag: :download, value:]


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

Stream = Data.define(:tag, :value)

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



362
363
364
# File 'lib/plushie/event.rb', line 362

def value
  @value
end

#value [Object] the emitted chunk value([Object]) ⇒ Object (readonly)

Stream command chunk events. Triggered for each value emitted by a Command.stream source.

Examples:

Stream chunk

in Event::Stream[tag: :download, value:]


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

Stream = Data.define(:tag, :value)

Instance Method Details

#withStream

Parameters:

  • (Object)

Returns:



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

def with: (**untyped) -> Stream