Method: Confstruct::HashWithStructAccess#inspect
- Defined in:
- lib/confstruct/hash_with_struct_access.rb
#inspect ⇒ Object
We need an #inspect that does not evlauate Deferreds. We use #fetch instead of #[], since fetch does not evaluate Deferreds. Otherwise copied from hashie’s pretty_inspect
59 60 61 62 63 64 65 66 |
# File 'lib/confstruct/hash_with_struct_access.rb', line 59 def inspect ret = "#<#{self.class}" keys.sort_by(&:to_s).each do |key| ret << " #{key}=#{self.fetch(key).inspect}" end ret << '>' ret end |