Class: Ceres::Inspector
- Inherits:
-
Object
- Object
- Ceres::Inspector
- Defined in:
- lib/ceres/inspector.rb
Instance Method Summary collapse
-
#initialize(&block) ⇒ Inspector
constructor
A new instance of Inspector.
- #inspect_object(object) ⇒ Object
Constructor Details
#initialize(&block) ⇒ Inspector
Returns a new instance of Inspector.
3 4 5 |
# File 'lib/ceres/inspector.rb', line 3 def initialize(&block) @block = block end |
Instance Method Details
#inspect_object(object) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/ceres/inspector.rb', line 7 def inspect_object(object) if @block @block.call(object) else object end.inspect rescue => e "<EXCEPTION RAISED IN INSPECT: #{e.inspect}>" end |