tagomoris/rb-growthforecast — pull request #2 by chocoby (2013-02-23 17:48:02+00:00)
Title: Add support pass array of Item class when call Complex.new

I want to add complex and wrote this:

```ruby
spec = GrowthForecast::Complex.new({
...
data: [
GrowthForecast::Complex::Item.new({ graph_id: 1, type: 'LINE2', gmode: 'gauge', stack: true }),
]
})
```

I got the message:

```ruby
/(...)/growthforecast-0.0.2/lib/growthforecast/complex.rb:61:in `initialize': undefined method `keys' for # (NoMethodError)
from /(...)/growthforecast-0.0.2/lib/growthforecast/complex.rb:31:in `new'

...
```

so, I wrote this patch.

If this patch is not good, I think change the document.

`add_complex` part in README.md:

```
spec = GrowthForecast::Complex({
service_name: 'example', section_name: 'test', graph_name: 'summary1',
description: 'testing...', sumup: true,
data: graph_id_list.map{|id| {graph_id: id, type: 'AREA', gmode: 'gauge', stack: true} }
})
```

What do you think about this?