Class: CartoCSSHelper::PairOfComparedImages

Inherits:
Object
  • Object
show all
Defined in:
lib/cartocss_helper/visualise_changes_diff_from_images.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(left_image, right_image) ⇒ PairOfComparedImages

Returns a new instance of PairOfComparedImages.



22
23
24
25
26
27
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 22

def initialize(left_image, right_image)
  raise 'description mismatch' unless left_image.description == right_image.description
  @left_file_location = left_image.file_location
  @right_file_location = right_image.file_location
  @description = left_image.description
end

Instance Attribute Details

#descriptionObject

Returns the value of attribute description.



21
22
23
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 21

def description
  @description
end

#left_file_locationObject (readonly)

Returns the value of attribute left_file_location.



20
21
22
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 20

def left_file_location
  @left_file_location
end

#right_file_locationObject (readonly)

Returns the value of attribute right_file_location.



20
21
22
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 20

def right_file_location
  @right_file_location
end

Instance Method Details

#merge_description_from_next_image(image) ⇒ Object



29
30
31
# File 'lib/cartocss_helper/visualise_changes_diff_from_images.rb', line 29

def merge_description_from_next_image(image)
  @description << ', ' << image.description
end