Sha256: e19a0a1f275cffea3a753df04d96cc2863c6c9cffc811a2e41963d40276466c9
Contents?: true
Size: 627 Bytes
Versions: 27
Compression:
Stored size: 627 Bytes
Contents
module Rack class MiniProfiler # A base class for timing structures class TimerStruct def initialize(attrs={}) @attributes = attrs end def attributes @attributes ||= {} end def [](name) attributes[name] end def []=(name, val) attributes[name] = val self end def to_json(*a) # this does could take in an option hash, but the only interesting there is max_nesting. # if this becomes an option we could increase ::JSON.generate( @attributes, :max_nesting => 100 ) end end end end
Version data entries
27 entries across 27 versions & 2 rubygems