Class: EventMachine::Zipper::Entry
- Inherits:
-
Object
- Object
- EventMachine::Zipper::Entry
- Includes:
- Deferrable
- Defined in:
- lib/em-zipper/entry.rb
Instance Attribute Summary collapse
-
#chunks ⇒ Object
readonly
Returns the value of attribute chunks.
-
#file_path ⇒ Object
readonly
Returns the value of attribute file_path.
-
#out ⇒ Object
readonly
Returns the value of attribute out.
Instance Method Summary collapse
-
#initialize(file_path, chunks, out) ⇒ Entry
constructor
A new instance of Entry.
- #write! ⇒ Object
Constructor Details
#initialize(file_path, chunks, out) ⇒ Entry
Returns a new instance of Entry.
8 9 10 11 12 |
# File 'lib/em-zipper/entry.rb', line 8 def initialize(file_path, chunks, out) @file_path = file_path @chunks = chunks @out = out end |
Instance Attribute Details
#chunks ⇒ Object (readonly)
Returns the value of attribute chunks.
6 7 8 |
# File 'lib/em-zipper/entry.rb', line 6 def chunks @chunks end |
#file_path ⇒ Object (readonly)
Returns the value of attribute file_path.
6 7 8 |
# File 'lib/em-zipper/entry.rb', line 6 def file_path @file_path end |
#out ⇒ Object (readonly)
Returns the value of attribute out.
6 7 8 |
# File 'lib/em-zipper/entry.rb', line 6 def out @out end |
Instance Method Details
#write! ⇒ Object
14 15 16 17 18 19 |
# File 'lib/em-zipper/entry.rb', line 14 def write! create_entry EM.next_tick { chunks.pop(&write_chunks) } self end |