Class: Plushie::Event::Stream

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

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 Attribute Details

#tagObject (readonly)

Returns the value of attribute tag

Returns:

  • (Object)

    the current value of tag



311
312
313
# File 'lib/plushie/event.rb', line 311

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:]


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

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

#valueObject (readonly)

Returns the value of attribute value

Returns:

  • (Object)

    the current value of value



311
312
313
# File 'lib/plushie/event.rb', line 311

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:]


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

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