[IC:SymbolHash{:Rack::Counter#record_hit!o:$YARD::CodeObjects::MethodObject:@parameters[:@explicitT: @files[["lib/rack_counter.rbi0: @scope: instance: @linei0: @name:record_hit!:@docstringIC:YARD::Docstring" : @all": @object@:@line_range0:@ref_tags[: @tags[:@tag_factoryo:YARD::Tags::Library: @factoryo:YARD::Tags::DefaultFactory:@visibility: private:@signature"4def record_hit! memcache.incr('hits') end: @source"0def record_hit! memcache.incr('hits') end:@namespaceo:#YARD::CodeObjects::ClassObject:@class_mixinsIC:&YARD::CodeObjects::CodeObjectList[: @owner@; [[@ i :@childrenIC;"[o;;[; [[@ i ; ; ;:app;IC;")Returns the value of attribute +app+ ;")Returns the value of attribute +app+;@;0;[;[;o;;@;: public;" def app;"def app @app end;@;[:@current_file_has_commentsFo;;[; [[@ i ; ; ;: options;IC;"-Returns the value of attribute +options+ ;"-Returns the value of attribute +options+;@%;0;[;[;o;;@;;&;"def options;"def options @options end;@;[;'Fo;;[["app0[" options"{}; T; [[@ i ; ; ; i ;:initialize;IC;" ;";@1;0;[;[;o;;@;;&;"|def initialize(app, options={}) @app = app @options = options reset_stats! unless initialized? end;"tdef initialize(app, options={}) @app = app @options = options reset_stats! unless initialized? end;@;[;'Fo;;[["env0; T; [[@ i; ; ; i;: call;IC;" ;";@B;0;[;[;o;;@;;&;"Ødef call(env) case env['PATH_INFO'] when '/_stats.json' then [200, {}, [stats.to_json]] when '/_stats/reset' then reset_stats! else record_hit!; app.call(env) end end;"Ìdef call(env) case env['PATH_INFO'] when '/_stats.json' then [200, {}, [stats.to_json]] when '/_stats/reset' then reset_stats! else record_hit!; app.call(env) end end;@;[;'Fo;;[; T; [[@ i; ; ; i;:namespace;IC;" ;";@P;0;[;[;o;;@;;;"Bdef namespace options[:namespace] || 'rack-counter' end;">def namespace options[:namespace] || 'rack-counter' end;@;[;'Fo;;[; T; [[@ i"; ; ; i";:memcache_host;IC;" ;";@\;0;[;[;o;;@;;;"Mdef memcache_host options[:memcache_host] || 'localhost:11211' end;"Idef memcache_host options[:memcache_host] || 'localhost:11211' end;@;[;'Fo;;[; T; [[@ i(; ; ; i(;: memcache;IC;"Pmemcached ################################################################# ;["Pmemcached #################################################################;@h;o: Range: begini&: exclF:endi&;[;[;o;;@;;;"^def memcache @memcache ||= MemCache.new(memcache_host, :namespace => namespace) end;"Zdef memcache @memcache ||= MemCache.new(memcache_host, :namespace => namespace) end;@;[;'To;;[; T; [[@ i,; ; ; i,;:initialized?;IC;" ;";@v;0;[;[;o;;@;;;":def initialized? memcache.get('hits', true) end;"6def initialized? memcache.get('hits', true) end;@;[;'F@o;;[; T; [[@ i4; ; ; i4;:reset_stats!;IC;" ;";@};0;[;[;o;;@;;;"gdef reset_stats! memcache.set 'start', Time.now.utc memcache.set 'hits', 0, 0, true end;"adef reset_stats! memcache.set 'start', Time.now.utc memcache.set 'hits', 0, 0, true end;@;[;'Fo;;[; T; [[@ i;; ; ; i;;: hits;IC;"Pstats ##################################################################### ;["Pstats #####################################################################;@‰;o;.;/i9;0F;1i9;[;[;o;;@;;;"7def hits memcache.get('hits', true).to_i end;"3def hits memcache.get('hits', true).to_i end;@;[;'To;;[; T; [[@ i?; ; ; i?;:average_hits_per_second;IC;" ;";@—;0;[;[;o;;@;;;"sdef average_hits_per_second elapsed = (Time.now.utc - memcache.get('start')) hits.to_f / elapsed end;"mdef average_hits_per_second elapsed = (Time.now.utc - memcache.get('start')) hits.to_f / elapsed end;@;[;'Fo;;[; T; [[@ iD; ; ; iD;: stats;IC;" ;";@£;0;[;[;o;;@;;;"Udef stats { 'hits' => hits, 'avg_per_sec' => average_hits_per_second } end;"Qdef stats { 'hits' => hits, 'avg_per_sec' => average_hits_per_second } end;@;[;'F;#@;: Counter: @aliases{;IC;" ;";@;0;[;[;o;;@:@attributesIC;{: classIC;{:@symbolize_valueT; IC;{;%IC;{: write0: read@;;T;(IC;{;<0;=@%;;T;;T;;T;o:YARD::CodeObjects::Proxy;: Rack: @obj0;o:"YARD::CodeObjects::RootObject;!IC;"[;#@»; [;$IC;"[;#@»;: root;8{;IC;" ;";@»;[;[;o;;@;9IC;{;:IC;{;;T; IC;{;;T;;T;0;[:@instance_mixinsIC;"[;#@»;'F;[;CIC;"[;#@;'F:@superclasso;>;: Object;@0;@º;[;'F:Rack::Counter#options@%:*Rack::Counter#average_hits_per_second@—:Rack::Counter#initialize@1:Rack::Counter#stats@£:Rack::Counter#memcache@h:Rack::Counter@:Rack::Counter#reset_stats!@}:Rack::Counter#call@B:Rack::Counter#namespace@P;B@»:Rack::Counter#initialized?@v:Rack::Counter#hits@‰:Rack::Counter#app@: Rack::Counter#memcache_host@\;;T{" Object;: