Class: Shotgun::Loader::Body
- Inherits:
-
Struct
- Object
- Struct
- Shotgun::Loader::Body
- Defined in:
- lib/shotgun/loader.rb
Instance Attribute Summary (collapse)
-
- (Object) fd
Returns the value of attribute fd.
-
- (Object) pid
Returns the value of attribute pid.
Instance Method Summary (collapse)
Instance Attribute Details
- (Object) fd
Returns the value of attribute fd
59 60 61 |
# File 'lib/shotgun/loader.rb', line 59 def fd @fd end |
- (Object) pid
Returns the value of attribute pid
59 60 61 |
# File 'lib/shotgun/loader.rb', line 59 def pid @pid end |
Instance Method Details
- (Object) close
66 67 68 69 70 |
# File 'lib/shotgun/loader.rb', line 66 def close fd.close ensure Process.wait(pid) end |
- (Object) each
60 61 62 63 64 |
# File 'lib/shotgun/loader.rb', line 60 def each while chunk = fd.read(1024) yield chunk end end |