:add_popups =>false,\r
})\r
\r
- set_defaults if methods.include? "set_defaults"\r
+ set_defaults if respond_to? :set_defaults\r
\r
init_with config\r
end\r
def burn\r
raise "No data available" unless @data.size > 0\r
\r
- calculations if methods.include? 'calculations'\r
+ calculations if respond_to? :calculations\r
\r
start_svg\r
calculate_graph_dimensions\r
# by subclasses.\r
def init_with config\r
config.each { |key, value|\r
- self.send( key.to_s+"=", value ) if methods.include? key.to_s\r
+ self.send((key.to_s+"=").to_sym, value ) if respond_to? key.to_sym\r
}\r
end\r
\r