Module: PbSyringe
- Defined in:
- lib/pb_syringe.rb,
lib/pb_syringe/version.rb,
lib/pb_syringe/progressable.rb,
lib/pb_syringe/progress_unit.rb,
lib/pb_syringe/ansi_progressbar_unit.rb
Defined Under Namespace
Modules: Progressable Classes: AnsiProgressbarUnit, ProgressUnit
Constant Summary collapse
- VERSION =
"0.1.1"
Class Attribute Summary collapse
-
.suppress ⇒ Object
readonly
Returns the value of attribute suppress.
-
.suppress_proc ⇒ Object
readonly
Returns the value of attribute suppress_proc.
Class Method Summary collapse
Class Attribute Details
.suppress ⇒ Object (readonly)
Returns the value of attribute suppress.
7 8 9 |
# File 'lib/pb_syringe.rb', line 7 def suppress @suppress end |
.suppress_proc ⇒ Object (readonly)
Returns the value of attribute suppress_proc.
7 8 9 |
# File 'lib/pb_syringe.rb', line 7 def suppress_proc @suppress_proc end |
Class Method Details
.suppress? ⇒ Boolean
9 10 11 |
# File 'lib/pb_syringe.rb', line 9 def suppress? suppress_proc ? suppress_proc.call : suppress == true end |
.suppress_if(value = false, &block) ⇒ Object
13 14 15 16 |
# File 'lib/pb_syringe.rb', line 13 def suppress_if(value = false, &block) @suppress_proc = block if block_given? @suppress = value end |