Class: DotDiff::CommandWrapper
- Inherits:
-
Object
- Object
- DotDiff::CommandWrapper
- Defined in:
- lib/dotdiff/command_wrapper.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#pixels ⇒ Object
readonly
Returns the value of attribute pixels.
Instance Method Summary collapse
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
7 8 9 |
# File 'lib/dotdiff/command_wrapper.rb', line 7 def @message end |
#pixels ⇒ Object (readonly)
Returns the value of attribute pixels.
7 8 9 |
# File 'lib/dotdiff/command_wrapper.rb', line 7 def pixels @pixels end |
Instance Method Details
#failed? ⇒ Boolean
25 26 27 |
# File 'lib/dotdiff/command_wrapper.rb', line 25 def failed? @failed end |
#passed? ⇒ Boolean
21 22 23 |
# File 'lib/dotdiff/command_wrapper.rb', line 21 def passed? !failed? end |
#run(base_image, new_image, diff_image_path) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/dotdiff/command_wrapper.rb', line 9 def run(base_image, new_image, diff_image_path) output = run_command(base_image, new_image, diff_image_path) @message = output begin @pixels = Float(output) @failed = false rescue ArgumentError @failed = true end end |