Skip to content

Commit 21ea19a

Browse files
arzoo14v0dro
authored andcommitted
rubocop_changes (#35)
1 parent 98ce18d commit 21ea19a

33 files changed

+113
-219
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Metrics/ClassLength:
5252
Style/ParallelAssignment:
5353
Enabled: false
5454

55+
Style/CommentedKeyword:
56+
Enabled: false
57+
5558
Style/DoubleNegation:
5659
Enabled: false
5760

lib/rubyplot.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
module Rubyplot
1818
def self.backend
1919
b = ENV['RUBYPLOT_BACKEND']
20-
return b.to_sym if %w[magick ].include?(b)
20+
return b.to_sym if %w[magick].include?(b)
2121

2222
:magick
2323
end

lib/rubyplot/artist/axes.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,7 @@ def configure_title
275275
@texts << Rubyplot::Artist::Text.new(
276276
@title, self, abs_x: abs_x + width / 2, abs_y: abs_y + @title_margin,
277277
font: @font, color: @font_color,
278-
pointsize: @title_font_size, internal_label: 'axes title.'
279-
280-
)
278+
pointsize: @title_font_size, internal_label: 'axes title.')
281279
end
282280

283281
def calculate_xy_axes_origin
@@ -348,9 +346,6 @@ def set_yrange
348346
@y_axis.min_val = @y_range[0]
349347
@y_axis.max_val = @y_range[1]
350348
end
351-
end
352-
# class Axes
353-
end
354-
# moudle Artist
355-
end
356-
# module Rubyplot
349+
end # class Axes
350+
end # moudle Artist
351+
end # module Rubyplot

lib/rubyplot/artist/axis/base.rb

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,13 @@ def initialize axes
2323
@lines = []
2424
end
2525

26-
2726
def draw
2827
configure_title
2928
@lines.each(&:draw)
3029
@texts.each(&:draw)
3130
end
3231

33-
end
34-
# class Base
35-
end
36-
# class Axis
37-
end
38-
# class Artist
39-
end
40-
# module Rubyplot
32+
end # class Base
33+
end # class Axis
34+
end # class Artist
35+
end # module Rubyplot

lib/rubyplot/artist/axis/x_axis.rb

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def initialize axes
1111
@length = (@abs_x2 - @abs_x1).abs
1212
configure_axis_line
1313
end
14-
14+
1515
private
1616

1717
def configure_axis_line
@@ -30,9 +30,6 @@ def configure_title
3030
abs_x: @axes.origin[0] + (@abs_x2 - @abs_x1)/2
3131
)
3232
end
33-
end
34-
# class XAxis
35-
end
36-
# class Artist
37-
end
38-
# module Rubyplot
33+
end # class XAxis
34+
end # class Artist
35+
end # module Rubyplot

lib/rubyplot/artist/axis/y_axis.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,6 @@ def configure_title
3535
pointsize: @axes.marker_font_size
3636
)
3737
end
38-
end
39-
# class YAxis
40-
end
41-
# class Artist
42-
end
43-
# module Rubyplot
38+
end # class YAxis
39+
end # class Artist
40+
end # module Rubyplot

lib/rubyplot/artist/base.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ def initialize(backend, abs_x, abs_y)
1212
@abs_x = abs_x
1313
@abs_y = abs_y
1414
end
15-
end
16-
# class Base
17-
end
18-
# module Artist
19-
end
20-
# module Rubyplot
15+
end # class Base
16+
end # module Artist
17+
end # module Rubyplot

lib/rubyplot/artist/circle.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ def draw
2323
color: Rubyplot::Color::COLOR_INDEX[@color]
2424
)
2525
end
26-
end
27-
# class Circle
28-
end
29-
# module Artist
30-
end
31-
# module Rubyplot
26+
end # class Circle
27+
end # module Artist
28+
end # module Rubyplot

lib/rubyplot/artist/figure.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ def setup_default_theme
8484
@marker_color = @theme_options[:marker_color]
8585
@font_color = @theme_options[:font_color] || @marker_color
8686
end
87-
end
88-
# class Figure
89-
end
90-
# module Artist
91-
end
92-
# module Rubyplot
87+
end # class Figure
88+
end # module Artist
89+
end # module Rubyplot

lib/rubyplot/artist/legend.rb

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ def configure_legend_text
5454
pointsize: @font_size
5555
)
5656
end
57-
end
58-
# class Legend
59-
end
60-
# class Artist
61-
end
62-
# module Rubyplot
57+
end # class Legend
58+
end # class Artist
59+
end # module Rubyplot

0 commit comments

Comments
 (0)