Method: GChart::Base#initialize

Defined in:
lib/gchart/base.rb

#initialize(options = {}) {|_self| ... } ⇒ Base

Returns a new instance of Base.

Yields:

  • (_self)

Yield Parameters:

  • _self (GChart::Base)

    the object that the method was called on



30
31
32
33
34
35
36
37
38
# File 'lib/gchart/base.rb', line 30

def initialize(options={}, &block)
  @data = []
  @extras = {}
  @width = 300
  @height = 200
  
  options.each { |k, v| send("#{k}=", v) }
  yield(self) if block_given?
end