module AnalyticsHelper def google_analytics( opts = {} ) # if no user account code (e.g. UA-397343-10) passed along use # code from *.yml settings code = opts.fetch( :code, config.google_analytics_code ) puts " Adding JavaScript for Google Analytics tracker (#{code})..." text = < EOS guard_text( text ) end end # module AnalyticsHelper class Slideshow::Gen include AnalyticsHelper end