Class: DSP::InitializedEvent

Inherits:
DSPBase
  • Object
show all
Defined in:
lib/dsp/dsp_protocol.rb

Overview

interface InitializedEvent extends Event


Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#to_h, #to_json

Constructor Details

#initialize(initial_hash = nil) ⇒ InitializedEvent

Returns a new instance of InitializedEvent.



227
228
229
230
# File 'lib/dsp/dsp_protocol.rb', line 227

def initialize(initial_hash = nil)
  super
  @optional_method_names = i[body]
end

Instance Attribute Details

#bodyObject

type: string # type: any # type: number # type: string



225
226
227
# File 'lib/dsp/dsp_protocol.rb', line 225

def body
  @body
end

#eventObject

type: string # type: any # type: number # type: string



225
226
227
# File 'lib/dsp/dsp_protocol.rb', line 225

def event
  @event
end

#seqObject

type: string # type: any # type: number # type: string



225
226
227
# File 'lib/dsp/dsp_protocol.rb', line 225

def seq
  @seq
end

#typeObject

type: string # type: any # type: number # type: string



225
226
227
# File 'lib/dsp/dsp_protocol.rb', line 225

def type
  @type
end

Instance Method Details

#from_h!(value) ⇒ Object



232
233
234
235
236
237
238
239
# File 'lib/dsp/dsp_protocol.rb', line 232

def from_h!(value)
  value = {} if value.nil?
  self.event = value['event']
  self.body = value['body']
  self.seq = value['seq']
  self.type = value['type']
  self
end