to_google_spreadsheet 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -11,6 +11,12 @@ Results in:
11
11
 
12
12
  ![Image of Google spreadsheets result once running above command](http://f.cl.ly/items/2O3w2k0Y410R3c3r3T1K/Screen%20shot%202011-06-27%20at%209.16.11%20.png)
13
13
 
14
+ You could also use this within Rails like so:
15
+
16
+ ```ruby
17
+ Account.all.to_google_spreadsheet("Accounts")
18
+ ```
19
+
14
20
  ## Usage
15
21
 
16
22
  ### Installation
@@ -56,7 +62,7 @@ The first argument is the name of the worksheet within the spreadsheet, e.g. "Ac
56
62
  ## Supported objects
57
63
 
58
64
  ```ruby
59
- assert array.all? {|e| [OpenStruct,Hash,ActiveRecord::Base].any? { |type| e.kind_of?(type) }} to a Google spreadsheet
65
+ assert array.all? {|e| [OpenStruct,Hash,ActiveRecord::Base].any? { |type| e.kind_of?(type) }}
60
66
  ```
61
67
 
62
68
  I.e. anything that is `#kind_of? Hash`, an `OpenStruct` or an ActiveRecord model. It is [easy to add support for additional types][at].
@@ -45,7 +45,7 @@ module GoogleSpreadsheet
45
45
  end
46
46
  end
47
47
 
48
- class Array
48
+ module Enumerable
49
49
  include ToGoogleSpreadsheet
50
50
 
51
51
  def to_google_spreadsheet(worksheet, spreadsheet = nil)
@@ -1,3 +1,3 @@
1
1
  module ToGoogleSpreadsheet
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -1,4 +1,4 @@
1
- require './lib/to_google_spreadsheet'
1
+ require 'to_google_spreadsheet'
2
2
 
3
3
  # data = [
4
4
  # {
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_google_spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Simon H. Eskildsen