Module: GoogleChart::Data
Constant Summary collapse
- @@simple =
('A'..'Z').to_a + ('a'..'z').to_a + ('0'..'9').to_a
- @@extended =
alphabet.map {|a| alphabet.map {|b| a + b }}.flatten
Instance Attribute Summary collapse
-
#encoding ⇒ Object
writeonly
Sets the attribute encoding.
-
#scale ⇒ Object
writeonly
Sets the attribute scale.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#encoding=(value) ⇒ Object
Sets the attribute encoding
8 9 10 |
# File 'lib/google_chart/data.rb', line 8 def encoding=(value) @encoding = value end |
#scale=(value) ⇒ Object
Sets the attribute scale
8 9 10 |
# File 'lib/google_chart/data.rb', line 8 def scale=(value) @scale = value end |
Class Method Details
.included(klass) ⇒ Object
4 5 6 |
# File 'lib/google_chart/data.rb', line 4 def self.included(klass) klass.register!(:data) end |
Instance Method Details
#data ⇒ Object
18 19 20 |
# File 'lib/google_chart/data.rb', line 18 def data 'chd=' + send(:"#{encoding}_encode", @data) if @data end |
#data=(data) ⇒ Object
14 15 16 |
# File 'lib/google_chart/data.rb', line 14 def data=(data) @data = data.any? {|e| Array === e } ? data : [data] end |