Class: DSP::Thread

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

Overview

interface Thread {

    /** Unique identifier for the thread. */
    id: number;
    /** A name of the thread. */
    name: string;
}

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from DSPBase

#initialize, #to_h, #to_json

Constructor Details

This class inherits a constructor from DSP::DSPBase

Instance Attribute Details

#idObject

type: number # type: string



3866
3867
3868
# File 'lib/dsp/dsp_protocol.rb', line 3866

def id
  @id
end

#nameObject

type: number # type: string



3866
3867
3868
# File 'lib/dsp/dsp_protocol.rb', line 3866

def name
  @name
end

Instance Method Details

#from_h!(value) ⇒ Object



3868
3869
3870
3871
3872
3873
# File 'lib/dsp/dsp_protocol.rb', line 3868

def from_h!(value)
  value = {} if value.nil?
  self.id = value['id']
  self.name = value['name']
  self
end