rbgct 0.0.9 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,7 +9,6 @@ module Rbgct::Charts
9
9
 
10
10
  def initialize(data, opts)
11
11
  raise ArgumentError.new('x_method or y_method are not defined') unless opts[:x_method] && opts[:y_method]
12
- raise ArgumentError.new('dataset is not an Array') unless data.is_a?(Array)
13
12
 
14
13
  @data = data
15
14
 
@@ -8,7 +8,6 @@ module Rbgct::Charts
8
8
 
9
9
  def initialize(data, opts)
10
10
  raise ArgumentError.new('name or value are not defined') unless opts[:name] && opts[:value]
11
- raise ArgumentError.new('dataset is not an Array') unless data.is_a?(Array)
12
11
 
13
12
  @data = data
14
13
 
data/lib/rbgct/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Rbgct
2
- VERSION = "0.0.9"
2
+ VERSION = "0.1.0"
3
3
  end
data/lib/rbgct.rb CHANGED
@@ -8,6 +8,7 @@ module Rbgct
8
8
  class NotImplementedError < StandardError; end
9
9
 
10
10
  def self.render(data, opts={})
11
+ raise ArgumentError.new('Dataset must respond to :each') unless data.respond_to?(:each)
11
12
  chart = ChartFactory[opts[:type]].new(data,opts)
12
13
  chart.render
13
14
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rbgct
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.9
5
+ version: 0.1.0
6
6
  platform: ruby
7
7
  authors:
8
8
  - Emanuele Tozzato
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-07-01 00:00:00 Z
13
+ date: 2011-07-02 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: "Google Chart Tools provide a perfect way to visualize data on your website: now on Ruby"