Copyright (c) 2010 Michael Dvorkin Awesome Print is freely distributable under the terms of MIT license. See LICENSE file or http://www.opensource.org/licenses/mit-license.php
Format ActiveSupport::TimeWithZone as standard Time.
# File lib/ap/mixin/active_support.rb, line 29
29: def awesome_active_support_time(object)
30: awesome_self(object, :as => :time)
31: end
Format HashWithIndifferentAccess as standard Hash. NOTE: can't use awesome_self(object, :as => :hash) since awesome_self uses object.inspect internally, i.e. it would convert hash to string.
# File lib/ap/mixin/active_support.rb, line 38
38: def awesome_hash_with_indifferent_access(object)
39: awesome_hash(object)
40: end
Add ActiveSupport class names to the dispatcher pipeline.
# File lib/ap/mixin/active_support.rb, line 15
15: def printable_with_active_support(object)
16: printable = printable_without_active_support(object)
17: if printable == :self
18: if object.is_a?(ActiveSupport::TimeWithZone)
19: printable = :active_support_time
20: elsif object.is_a?(HashWithIndifferentAccess)
21: printable = :hash_with_indifferent_access
22: end
23: end
24: printable
25: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.