Module: Analytical
- Defined in:
- lib/analytical.rb,
lib/analytical/api.rb,
lib/analytical/bot_detector.rb,
lib/analytical/modules/base.rb,
lib/analytical/rails/engine.rb,
lib/analytical/command_store.rb,
lib/analytical/modules/adroll.rb,
lib/analytical/modules/clicky.rb,
lib/analytical/modules/google.rb,
lib/analytical/modules/adwords.rb,
lib/analytical/modules/console.rb,
lib/analytical/modules/hubspot.rb,
lib/analytical/modules/comscore.rb,
lib/analytical/modules/loopfuse.rb,
lib/analytical/modules/mixpanel.rb,
lib/analytical/modules/chartbeat.rb,
lib/analytical/modules/crazy_egg.rb,
lib/analytical/modules/quantcast.rb,
lib/analytical/modules/click_tale.rb,
lib/analytical/modules/optimizely.rb,
lib/analytical/modules/kiss_metrics.rb,
lib/analytical/modules/reinvigorate.rb,
lib/analytical/modules/microsoft_ads.rb,
lib/analytical/modules/performancing.rb,
lib/analytical/session_command_store.rb,
lib/analytical/modules/google_optimizer.rb
Defined Under Namespace
Modules: BotDetector, HelperMethods, InstanceMethods, Modules, Rails Classes: Api, CommandStore, SessionCommandStore
Instance Method Summary collapse
Instance Method Details
#analytical(options = {}) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/analytical.rb', line 9 def analytical(={}) self. = = { :modules => [] } File.open("#{::Rails.root}/config/analytical.yml") do |f| = YAML::load(ERB.new(f.read).result).symbolize_keys env = (::Rails.env || :production).to_sym = [env] if .has_key?(env) .each do |k, v| if v.respond_to?(:symbolize_keys) # module configuration [k.to_sym] = v.symbolize_keys [:modules] << k.to_sym unless && [:modules] else # regular option [k.to_sym] = v end end if end if File.exists?("#{::Rails.root}/config/analytical.yml") self. = self..reverse_merge end |