Class: ProgressBar::Format::Molecule
- Inherits:
-
Object
- Object
- ProgressBar::Format::Molecule
- Defined in:
- lib/ruby-progressbar/format/molecule.rb
Constant Summary collapse
- MOLECULES =
{ :t => :title, :T => :title, :c => :progress, :C => :total, :p => :percentage, :P => :percentage_with_precision, :j => :justified_percentage, :J => :justified_percentage_with_precision, :a => :elapsed_time, :e => :estimated_time_with_unknown_oob, :E => :estimated_time_with_friendly_oob, :f => :estimated_time_with_no_oob, :B => :complete_bar, :b => :bar, :w => :bar_with_percentage, :i => :incomplete_space, :r => :rate_of_change, :R => :rate_of_change_with_precision, }
- BAR_MOLECULES =
%w{w B b i}
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
Instance Method Summary collapse
- #bar_molecule? ⇒ Boolean
-
#initialize(letter) ⇒ Molecule
constructor
A new instance of Molecule.
Constructor Details
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
27 28 29 |
# File 'lib/ruby-progressbar/format/molecule.rb', line 27 def key @key end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
28 29 30 |
# File 'lib/ruby-progressbar/format/molecule.rb', line 28 def method_name @method_name end |
Instance Method Details
#bar_molecule? ⇒ Boolean
35 36 37 |
# File 'lib/ruby-progressbar/format/molecule.rb', line 35 def BAR_MOLECULES.include? @key end |