Class: TorigoyaKit::StreamOutputResult
- Inherits:
-
Object
- Object
- TorigoyaKit::StreamOutputResult
- Defined in:
- lib/torigoya_kit/stream_result.rb
Overview
related to MessageKindOutputs
Instance Attribute Summary collapse
-
#index ⇒ Object
readonly
Returns the value of attribute index.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#output ⇒ Object
readonly
Returns the value of attribute output.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(mode, index, output) ⇒ StreamOutputResult
constructor
A new instance of StreamOutputResult.
- #to_s ⇒ Object
Constructor Details
#initialize(mode, index, output) ⇒ StreamOutputResult
43 44 45 46 47 48 49 |
# File 'lib/torigoya_kit/stream_result.rb', line 43 def initialize(mode, index, output) @mode = mode @index = index @output = output validate end |
Instance Attribute Details
#index ⇒ Object (readonly)
Returns the value of attribute index.
50 51 52 |
# File 'lib/torigoya_kit/stream_result.rb', line 50 def index @index end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
50 51 52 |
# File 'lib/torigoya_kit/stream_result.rb', line 50 def mode @mode end |
#output ⇒ Object (readonly)
Returns the value of attribute output.
50 51 52 |
# File 'lib/torigoya_kit/stream_result.rb', line 50 def output @output end |
Class Method Details
.from_hash(hash) ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/torigoya_kit/stream_result.rb', line 52 def self.from_hash(hash) return StreamOutputResult.new( hash["mode"], hash["index"], StreamOutput.from_hash(hash["output"]) ) end |
Instance Method Details
#to_s ⇒ Object
60 61 62 |
# File 'lib/torigoya_kit/stream_result.rb', line 60 def to_s return "#{self.class}/[#{@mode} #{@index} #{@output.to_s}]" end |