lib/githubchart.rb in githubchart-3.2.0 vs lib/githubchart.rb in githubchart-3.3.0
- old
+ new
@@ -62,12 +62,10 @@
@colors = params[:colors] || :default
@colors = COLOR_SCHEMES[@colors] unless @colors.is_a? Array
end
def render(type)
- unless GithubChart.supports? type
- raise NameError, "Format #{type} is unsupported."
- end
+ raise(NameError, "Format #{type} is unsupported.") unless GithubChart.supports? type
send("render_#{type}".to_sym)
end
private