Class: Shutterbug::Service::RackFile
- Inherits:
-
Object
- Object
- Shutterbug::Service::RackFile
show all
- Defined in:
- lib/shutterbug/service.rb
Instance Method Summary
collapse
Constructor Details
#initialize(file) ⇒ RackFile
Returns a new instance of RackFile.
5
6
7
|
# File 'lib/shutterbug/service.rb', line 5
def initialize(file)
@stream_file = file
end
|
Instance Method Details
#each(&blk) ⇒ Object
14
15
16
17
18
|
# File 'lib/shutterbug/service.rb', line 14
def each(&blk)
@stream_file.each(&blk)
ensure
@stream_file.close
end
|
#open ⇒ Object
9
10
11
12
|
# File 'lib/shutterbug/service.rb', line 9
def open
@stream_file.open
@stream_file.rewind
end
|
#size ⇒ Object
20
21
22
|
# File 'lib/shutterbug/service.rb', line 20
def size
@stream_file.size
end
|