Module: ActiveMocker::LoggerToJson Private
- Defined in:
- lib/active_mocker/model_schema.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #initialize(*args) ⇒ Object private
Instance Method Details
#initialize(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
5 6 7 8 9 10 11 |
# File 'lib/active_mocker/model_schema.rb', line 5 def initialize(*args) super(args) UnitLogger.unit.info "#{caller_locations[1]}\n" obj = JSON.parse(self.to_hash.to_json) UnitLogger.unit.info "#{self.class.name}: #{JSON.pretty_unparse(obj)}\n" puts "#{self.class.name}: #{JSON.pretty_unparse(obj)}\n" end |