module Destruct::Object

Public Instance Methods

destruct(*paths, &block) click to toggle source
  # File lib/destruct/object.rb
3 def destruct(*paths, &block)
4   Destruct.new(self, *paths, &block).to_h
5 end
dig(method, *paths) click to toggle source
   # File lib/destruct/object.rb
 7 def dig(method, *paths)
 8   object = send(method) if respond_to?(method)
 9   paths.any? ? object&.dig(*paths) : object
10 end