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