Rubocop: Lint/StringConversionInInterpolation

- Redundant use of Object#to_s in interpolation
This commit is contained in:
Pat Hawks 2016-01-03 17:16:58 -08:00
parent 13c980c896
commit f221b925b4
1 changed files with 1 additions and 1 deletions

View File

@ -111,7 +111,7 @@ eos
def add_code_tag(code) def add_code_tag(code)
code_attributes = [ code_attributes = [
"class=\"language-#{@lang.to_s.tr('+', '-')}\"", "class=\"language-#{@lang.to_s.tr('+', '-')}\"",
"data-lang=\"#{@lang.to_s}\"" "data-lang=\"#{@lang}\""
].join(" ") ].join(" ")
"<figure class=\"highlight\"><pre><code #{code_attributes}>#{code.chomp}</code></pre></figure>" "<figure class=\"highlight\"><pre><code #{code_attributes}>#{code.chomp}</code></pre></figure>"
end end