Skip to content

Commit 6e39ff3

Browse files
committed
fix: rubocop
1 parent c2bc0d1 commit 6e39ff3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/presenters/charts_presenter.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class ChartsPresenter
22

3-
CHART_TYPES = %w[ bar bubble doughnut horizontal_bar line pie polar_area radar scatter ]
3+
CHART_TYPES = %w[bar bubble doughnut horizontal_bar line pie polar_area radar scatter].freeze
44

55
class << self
66
private
@@ -29,7 +29,7 @@ def to_html
2929
private
3030

3131
def to_js
32-
<<-END.squish.html_safe
32+
<<-JSBLOCK.squish.html_safe
3333
(function() {
3434
var initChart = function() {
3535
var ctx = document.getElementById(#{@element_id.to_json});
@@ -53,7 +53,7 @@ def to_js
5353
}
5454
}
5555
})();
56-
END
56+
JSBLOCK
5757
end
5858

5959
def canvas
@@ -81,7 +81,7 @@ def to_javascript_string(element)
8181
end
8282
'[' + array_elements.join(',') + ']'
8383
when String
84-
if element.match(/^\s*function.*}\s*$/m)
84+
if element =~ /^\s*function.*}\s*$/m
8585
# Raw-copy function definitions to the output without surrounding quotes.
8686
element
8787
else

0 commit comments

Comments
 (0)