ruby_marks 0.0.3.dev → 0.0.4.dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/ruby_marks/config.rb +3 -1
- data/lib/ruby_marks/document.rb +2 -2
- data/lib/ruby_marks/group.rb +2 -1
- data/lib/ruby_marks/version.rb +1 -1
- data/lib/ruby_marks.rb +3 -1
- metadata +1 -1
data/lib/ruby_marks/config.rb
CHANGED
@@ -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)
|
data/lib/ruby_marks/document.rb
CHANGED
@@ -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(
|
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(
|
118
|
+
move_to(group.distance_between_marks, 0)
|
119
119
|
end
|
120
120
|
end
|
121
121
|
end
|
data/lib/ruby_marks/group.rb
CHANGED
@@ -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?
|
data/lib/ruby_marks/version.rb
CHANGED
data/lib/ruby_marks.rb
CHANGED