ruby_marks 0.0.3.dev → 0.0.4.dev

Sign up to get free protection for your applications and to get access to all the features.
@@ -3,7 +3,8 @@ module RubyMarks
3
3
 
4
4
  class Config
5
5
 
6
- attr_accessor :clock_marks_scan_x, :intensity_percentual, :recognition_colors, :default_marks_options
6
+ attr_accessor :clock_marks_scan_x, :intensity_percentual, :recognition_colors, :default_marks_options,
7
+ :default_distance_between_marks
7
8
 
8
9
  def initialize(document)
9
10
  @document = document
@@ -11,6 +12,7 @@ module RubyMarks
11
12
  @intensity_percentual = @@intensity_percentual
12
13
  @recognition_colors = @@recognition_colors
13
14
  @default_marks_options = @@default_marks_options
15
+ @default_distance_between_marks = @@default_distance_between_marks
14
16
  end
15
17
 
16
18
  def define_group(group_label, &block)
@@ -79,7 +79,7 @@ module RubyMarks
79
79
  markeds = []
80
80
  group.marks_options.each do |mark|
81
81
  markeds << mark if marked?
82
- move_to(25, 0)
82
+ move_to(group.distance_between_marks, 0)
83
83
  end
84
84
  group_hash["group_#{key}".to_sym] = markeds if markeds.any?
85
85
  end
@@ -115,7 +115,7 @@ module RubyMarks
115
115
  move_to(group.x_distance_from_clock, 0)
116
116
  group.marks_options.each do |mark|
117
117
  add_mark file
118
- move_to(25, 0)
118
+ move_to(group.distance_between_marks, 0)
119
119
  end
120
120
  end
121
121
  end
@@ -4,12 +4,13 @@ module RubyMarks
4
4
  class Group
5
5
 
6
6
  attr_reader :label, :document, :clocks_range
7
- attr_accessor :marks_options, :x_distance_from_clock
7
+ attr_accessor :marks_options, :x_distance_from_clock, :distance_between_marks
8
8
 
9
9
  def initialize(label, document)
10
10
  @label = label
11
11
  @document = document
12
12
  @marks_options = @document.config.default_marks_options
13
+ @distance_between_marks = @document.config.default_distance_between_marks
13
14
  @x_distance_from_clock = 0
14
15
  @clocks_range = 0..0
15
16
  yield self if block_given?
@@ -1,3 +1,3 @@
1
1
  module RubyMarks
2
- VERSION = "0.0.3.dev".freeze
2
+ VERSION = "0.0.4.dev".freeze
3
3
  end
data/lib/ruby_marks.rb CHANGED
@@ -24,4 +24,6 @@ end
24
24
 
25
25
  @@recognition_colors = ["#000000"]
26
26
 
27
- @@default_marks_options = %w{A B C D E}
27
+ @@default_marks_options = %w{A B C D E}
28
+
29
+ @@default_distance_between_marks = 25
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_marks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3.dev
4
+ version: 0.0.4.dev
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors: