Class: Wp2txt::NewProgressBar

Inherits:
ProgressBar show all
Defined in:
lib/wp2txt/progressbar.rb

Instance Attribute Summary collapse

Attributes inherited from ProgressBar

#current, #start_time, #title, #total

Instance Method Summary collapse

Methods inherited from ProgressBar

#clear, #file_transfer_mode, #finish, #finished?, #format=, #format_arguments=, #halt, #inc, #inspect, #set

Constructor Details

#initialize(filename, size) ⇒ NewProgressBar

Returns a new instance of NewProgressBar.



247
248
249
250
251
# File 'lib/wp2txt/progressbar.rb', line 247

def initialize(filename, size)
  @nhits = 0
  @nsentences = 0
  org_initialize(File.basename(filename), size)
end

Instance Attribute Details

#nhitsObject

Returns the value of attribute nhits.



243
244
245
# File 'lib/wp2txt/progressbar.rb', line 243

def nhits
  @nhits
end

#nsentencesObject

Returns the value of attribute nsentences.



243
244
245
# File 'lib/wp2txt/progressbar.rb', line 243

def nsentences
  @nsentences
end

Instance Method Details

#fmt_statObject



255
256
257
# File 'lib/wp2txt/progressbar.rb', line 255

def fmt_stat
  org_fmt_stat # + " Hits: " + @nhits.to_s

end

#org_fmt_statObject



253
# File 'lib/wp2txt/progressbar.rb', line 253

alias org_fmt_stat fmt_stat

#org_initializeObject



245
# File 'lib/wp2txt/progressbar.rb', line 245

alias org_initialize initialize