Class: ProgressBar::Format::Molecule
- Inherits:
-
Object
- Object
- ProgressBar::Format::Molecule
- Defined in:
- lib/progress_bar/format/molecule.rb
Constant Summary collapse
- MOLECULES =
{ :t => [:left_justified_title, :title], :T => [:right_justified_title, :title], :c => [:current_progress, :progress], :C => [:total_capacity, :total], :p => [:percentage_complete_as_integer, :percentage], :P => [:percentage_complete_as_float, :percentage_with_precision], :a => [:elapsed_time, :elapsed_time], :e => [:estimated_time_with_unknown, :estimated_time_with_unknown_oob], :E => [:estimated_time_with_greater_than, :estimated_time_with_friendly_oob], :f => [:force_estimated_time, :estimated_time_with_no_oob], :B => [:complete_bar, :complete_bar], :b => [:bar, :bar], :w => [:bar_with_percentage, :bar_with_percentage], :i => [:incomplete_space, :incomplete_space] }
- BAR_MOLECULES =
%w{w B b i}
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#method_arguments ⇒ Object
readonly
Returns the value of attribute method_arguments.
-
#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.
23 24 25 |
# File 'lib/progress_bar/format/molecule.rb', line 23 def key @key end |
#method_arguments ⇒ Object (readonly)
Returns the value of attribute method_arguments.
25 26 27 |
# File 'lib/progress_bar/format/molecule.rb', line 25 def method_arguments @method_arguments end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
24 25 26 |
# File 'lib/progress_bar/format/molecule.rb', line 24 def method_name @method_name end |
Instance Method Details
#bar_molecule? ⇒ Boolean
32 33 34 |
# File 'lib/progress_bar/format/molecule.rb', line 32 def BAR_MOLECULES.include? @key end |