lib/igs_pie_chart.rb
#encoding: utf-8
begin
mod = Required::Module::const_get "Igs"
#It exists
rescue NameError
module Igs
end
end
begin
if Rails.version.split('.').first.to_i >= 3
require 'd3_rails'
else
STDERR.puts "IGS Pie Chart does not support Rails versions below 3.x"
end
rescue NameError
#TODO: change this to use a logging api
puts "Not a Rails application, nothing to do here!"
puts " . . "
puts " ____ \n\n"
end
require 'erb'
require 'igs_pie_chart/chart'
require 'igs_pie_chart/version'
unless "".respond_to? 'camelize'
class String
def camelize
return self if self !~ /_/ && self =~ /[A-Z]+.*/
split('_').map{|e| e.capitalize}.join
end
end
end