Sha256: 266fa5e71db7860ac4c8e2645747fe1ecbc0640aa94b28724a9a4986221b8aef
Contents?: true
Size: 691 Bytes
Versions: 10
Compression:
Stored size: 691 Bytes
Contents
module Rack class MiniProfiler module TimerStruct # A base class for timing structures class Base 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 end
Version data entries
10 entries across 10 versions & 1 rubygems