Class: CartoCSSHelper::ImageForComparison
- Inherits:
-
Object
- Object
- CartoCSSHelper::ImageForComparison
- Defined in:
- lib/cartocss_helper/visualise_changes_diff_from_images.rb
Instance Attribute Summary collapse
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#file_location ⇒ Object
readonly
Returns the value of attribute file_location.
Instance Method Summary collapse
- #identical(another_image) ⇒ Object
-
#initialize(file_location, description) ⇒ ImageForComparison
constructor
A new instance of ImageForComparison.
Constructor Details
#initialize(file_location, description) ⇒ ImageForComparison
Returns a new instance of ImageForComparison.
8 9 10 11 |
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 8 def initialize(file_location, description) @file_location = file_location @description = description end |
Instance Attribute Details
#description ⇒ Object (readonly)
Returns the value of attribute description.
7 8 9 |
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 7 def description @description end |
#file_location ⇒ Object (readonly)
Returns the value of attribute file_location.
7 8 9 |
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 7 def file_location @file_location end |
Instance Method Details
#identical(another_image) ⇒ Object
13 14 15 16 |
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 13 def identical(another_image) # Returns true if the contents of a file A and a file B are identical. return FileUtils.compare_file(file_location, another_image.file_location) end |