Class: RubyMarks::Config
- Inherits:
-
Object
- Object
- RubyMarks::Config
- Defined in:
- lib/ruby_marks/config.rb
Instance Attribute Summary collapse
-
#auto_ajust_block_height ⇒ Object
Returns the value of attribute auto_ajust_block_height.
-
#auto_ajust_block_width ⇒ Object
Returns the value of attribute auto_ajust_block_width.
-
#default_block_height_tolerance ⇒ Object
Returns the value of attribute default_block_height_tolerance.
-
#default_block_width_tolerance ⇒ Object
Returns the value of attribute default_block_width_tolerance.
-
#default_distance_between_marks ⇒ Object
Returns the value of attribute default_distance_between_marks.
-
#default_expected_lines ⇒ Object
Returns the value of attribute default_expected_lines.
-
#default_mark_height ⇒ Object
Returns the value of attribute default_mark_height.
-
#default_mark_height_tolerance ⇒ Object
Returns the value of attribute default_mark_height_tolerance.
-
#default_mark_width ⇒ Object
Returns the value of attribute default_mark_width.
-
#default_mark_width_tolerance ⇒ Object
Returns the value of attribute default_mark_width_tolerance.
-
#default_marks_options ⇒ Object
Returns the value of attribute default_marks_options.
-
#edge_level ⇒ Object
Returns the value of attribute edge_level.
-
#intensity_percentual ⇒ Object
Returns the value of attribute intensity_percentual.
-
#scan_mode ⇒ Object
Returns the value of attribute scan_mode.
-
#scan_timeout ⇒ Object
Returns the value of attribute scan_timeout.
-
#threshold_level ⇒ Object
Returns the value of attribute threshold_level.
Instance Method Summary collapse
- #calculated_threshold_level ⇒ Object
- #configure {|_self| ... } ⇒ Object
- #define_group(group_label, &block) ⇒ Object
-
#initialize(recognizer) ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize(recognizer) ⇒ Config
Returns a new instance of Config.
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/ruby_marks/config.rb', line 14 def initialize(recognizer) @recognizer = recognizer @threshold_level = RubyMarks.threshold_level @edge_level = RubyMarks.edge_level @scan_timeout = RubyMarks.scan_timeout @intensity_percentual = RubyMarks.intensity_percentual @default_block_width_tolerance = RubyMarks.default_block_width_tolerance @default_block_height_tolerance = RubyMarks.default_block_height_tolerance @default_mark_width = RubyMarks.default_mark_width @default_mark_height = RubyMarks.default_mark_height @default_mark_width_tolerance = RubyMarks.default_mark_width_tolerance @default_mark_height_tolerance = RubyMarks.default_mark_height_tolerance @default_marks_options = RubyMarks. @default_distance_between_marks = RubyMarks.default_distance_between_marks @default_expected_lines = RubyMarks.default_expected_lines end |
Instance Attribute Details
#auto_ajust_block_height ⇒ Object
Returns the value of attribute auto_ajust_block_height.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def auto_ajust_block_height @auto_ajust_block_height end |
#auto_ajust_block_width ⇒ Object
Returns the value of attribute auto_ajust_block_width.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def auto_ajust_block_width @auto_ajust_block_width end |
#default_block_height_tolerance ⇒ Object
Returns the value of attribute default_block_height_tolerance.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_block_height_tolerance @default_block_height_tolerance end |
#default_block_width_tolerance ⇒ Object
Returns the value of attribute default_block_width_tolerance.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_block_width_tolerance @default_block_width_tolerance end |
#default_distance_between_marks ⇒ Object
Returns the value of attribute default_distance_between_marks.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_distance_between_marks @default_distance_between_marks end |
#default_expected_lines ⇒ Object
Returns the value of attribute default_expected_lines.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_expected_lines @default_expected_lines end |
#default_mark_height ⇒ Object
Returns the value of attribute default_mark_height.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_mark_height @default_mark_height end |
#default_mark_height_tolerance ⇒ Object
Returns the value of attribute default_mark_height_tolerance.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_mark_height_tolerance @default_mark_height_tolerance end |
#default_mark_width ⇒ Object
Returns the value of attribute default_mark_width.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_mark_width @default_mark_width end |
#default_mark_width_tolerance ⇒ Object
Returns the value of attribute default_mark_width_tolerance.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def default_mark_width_tolerance @default_mark_width_tolerance end |
#default_marks_options ⇒ Object
Returns the value of attribute default_marks_options.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def @default_marks_options end |
#edge_level ⇒ Object
Returns the value of attribute edge_level.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def edge_level @edge_level end |
#intensity_percentual ⇒ Object
Returns the value of attribute intensity_percentual.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def intensity_percentual @intensity_percentual end |
#scan_mode ⇒ Object
Returns the value of attribute scan_mode.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def scan_mode @scan_mode end |
#scan_timeout ⇒ Object
Returns the value of attribute scan_timeout.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def scan_timeout @scan_timeout end |
#threshold_level ⇒ Object
Returns the value of attribute threshold_level.
6 7 8 |
# File 'lib/ruby_marks/config.rb', line 6 def threshold_level @threshold_level end |
Instance Method Details
#calculated_threshold_level ⇒ Object
36 37 38 |
# File 'lib/ruby_marks/config.rb', line 36 def calculated_threshold_level Magick::QuantumRange * (@threshold_level.to_f / 100) end |
#configure {|_self| ... } ⇒ Object
45 46 47 |
# File 'lib/ruby_marks/config.rb', line 45 def configure yield self if block_given? end |