class RubyMarks::Group
Attributes
block_height_tolerance[RW]
block_width_tolerance[RW]
coordinates[RW]
distance_between_marks[RW]
expected_coordinates[RW]
expected_lines[RW]
label[R]
mark_height[RW]
mark_height_tolerance[RW]
mark_width[RW]
mark_width_tolerance[RW]
marks[RW]
marks_options[RW]
recognizer[R]
Public Class Methods
new(label, recognizer) { |self| ... }
click to toggle source
# File lib/ruby_marks/group.rb, line 10 def initialize(label, recognizer) @label = label @recognizer = recognizer @block_width_tolerance = @recognizer.config.default_block_width_tolerance @block_height_tolerance = @recognizer.config.default_block_height_tolerance @mark_width = @recognizer.config.default_mark_width @mark_height = @recognizer.config.default_mark_height @mark_width_tolerance = @recognizer.config.default_mark_width_tolerance @mark_height_tolerance = @recognizer.config.default_mark_height_tolerance @marks_options = @recognizer.config.default_marks_options @distance_between_marks = @recognizer.config.default_distance_between_marks @expected_lines = @recognizer.config.default_expected_lines @expected_coordinates = {} yield self if block_given? end
Public Instance Methods
incorrect_expected_lines()
click to toggle source
# File lib/ruby_marks/group.rb, line 32 def incorrect_expected_lines @expected_lines != marks.count end
mark_height_tolerance_range()
click to toggle source
# File lib/ruby_marks/group.rb, line 61 def mark_height_tolerance_range mark_height_with_down_tolerance..mark_height_with_up_tolerance end
mark_height_with_down_tolerance()
click to toggle source
# File lib/ruby_marks/group.rb, line 46 def mark_height_with_down_tolerance @mark_height - @mark_height_tolerance end
mark_height_with_up_tolerance()
click to toggle source
# File lib/ruby_marks/group.rb, line 51 def mark_height_with_up_tolerance @mark_height + @mark_height_tolerance end
mark_width_tolerance_range()
click to toggle source
# File lib/ruby_marks/group.rb, line 56 def mark_width_tolerance_range mark_width_with_down_tolerance..mark_width_with_up_tolerance end
mark_width_with_down_tolerance()
click to toggle source
# File lib/ruby_marks/group.rb, line 36 def mark_width_with_down_tolerance @mark_width - @mark_width_tolerance end
mark_width_with_up_tolerance()
click to toggle source
# File lib/ruby_marks/group.rb, line 41 def mark_width_with_up_tolerance @mark_width + @mark_width_tolerance end