Class: TorigoyaKit::StreamOutput
- Inherits:
-
Object
- Object
- TorigoyaKit::StreamOutput
- Defined in:
- lib/torigoya_kit/stream_result.rb
Constant Summary collapse
- StdoutFd =
1- StderrFd =
2
Instance Attribute Summary collapse
-
#buffer ⇒ Object
readonly
Returns the value of attribute buffer.
-
#fd ⇒ Object
readonly
Returns the value of attribute fd.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(fd, buffer) ⇒ StreamOutput
constructor
A new instance of StreamOutput.
- #to_s ⇒ Object
Constructor Details
#initialize(fd, buffer) ⇒ StreamOutput
Returns a new instance of StreamOutput.
18 19 20 21 22 23 |
# File 'lib/torigoya_kit/stream_result.rb', line 18 def initialize(fd, buffer) @fd = fd @buffer = buffer validate end |
Instance Attribute Details
#buffer ⇒ Object (readonly)
Returns the value of attribute buffer.
24 25 26 |
# File 'lib/torigoya_kit/stream_result.rb', line 24 def buffer @buffer end |
#fd ⇒ Object (readonly)
Returns the value of attribute fd.
24 25 26 |
# File 'lib/torigoya_kit/stream_result.rb', line 24 def fd @fd end |
Class Method Details
.from_hash(hash) ⇒ Object
26 27 28 |
# File 'lib/torigoya_kit/stream_result.rb', line 26 def self.from_hash(hash) return StreamOutput.new(hash["fd"], hash["buffer"]) end |
Instance Method Details
#to_s ⇒ Object
30 31 32 |
# File 'lib/torigoya_kit/stream_result.rb', line 30 def to_s return "#{self.class}/[#{@fd} #{@buffer}]" end |