lib/highcharts/series.rb in highcharts-js-rails-0.0.1 vs lib/highcharts/series.rb in highcharts-js-rails-0.0.2
- old
+ new
@@ -1,19 +1,20 @@
module Highcharts
class Series < Base
-
+
attr_accessor :name, :type, :xAxis, :yAxis, :data
-
+
def to_s
rendered_options = render_options(:strings => 'name type', :objects => 'xAxis yAxis')
return nil if rendered_options.length == 0
"{" +
[rendered_options, render_data].flatten.compact.join(',') +
"}"
end
-
- def render_data
- "data: #{data.first.is_a?(Array) ? data : data.collect(&:to_f)}"
- end
-
+
+ private
+ def render_data
+ "data: #{data.first.is_a?(Array) ? data : data.collect(&:to_f)}"
+ end
+
end
-end
\ No newline at end of file
+end