Class: PEdump::CLI::ProgressProxy
Instance Attribute Summary collapse
Instance Method Summary
collapse
Constructor Details
200
201
202
203
204
205
|
# File 'lib/pedump/cli.rb', line 200
def initialize file
@file = file
@pbar = ProgressBar.new("[.] uploading", file.size, STDOUT)
@pbar.try(:file_transfer_mode)
@pbar.bar_mark = '='
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(*args) ⇒ Object
210
211
212
|
# File 'lib/pedump/cli.rb', line 210
def method_missing *args
@file.send *args
end
|
Instance Attribute Details
Returns the value of attribute pbar.
198
199
200
|
# File 'lib/pedump/cli.rb', line 198
def pbar
@pbar
end
|
Instance Method Details
#read(*args) ⇒ Object
206
207
208
209
|
# File 'lib/pedump/cli.rb', line 206
def read *args
@pbar.inc args.first
@file.read *args
end
|
#respond_to?(*args) ⇒ Boolean
213
214
215
|
# File 'lib/pedump/cli.rb', line 213
def respond_to? *args
@file.respond_to?(args.first) || super(*args)
end
|