Class: Reporter::Report
- Inherits:
-
Object
- Object
- Reporter::Report
- Defined in:
- lib/s3-object-processor.rb
Defined Under Namespace
Classes: DSL
Instance Method Summary collapse
- #description ⇒ Object
- #final ⇒ Object
-
#initialize(init_value, &setup) ⇒ Report
constructor
A new instance of Report.
- #to_s ⇒ Object
- #update(value) ⇒ Object
- #value ⇒ Object
Constructor Details
Instance Method Details
#description ⇒ Object
151 152 153 |
# File 'lib/s3-object-processor.rb', line 151 def description @dsl.description end |
#final ⇒ Object
159 160 161 |
# File 'lib/s3-object-processor.rb', line 159 def final "#{description}: ".ljust(40) + value end |
#to_s ⇒ Object
155 156 157 |
# File 'lib/s3-object-processor.rb', line 155 def to_s "#{description}: #{value.rjust(6)}" end |
#update(value) ⇒ Object
143 144 145 |
# File 'lib/s3-object-processor.rb', line 143 def update(value) @value = @dsl.update_callback.call(@value, value) end |
#value ⇒ Object
147 148 149 |
# File 'lib/s3-object-processor.rb', line 147 def value @dsl.value_pattern % [@dsl.value_processor.call(@value)] end |