Module: Prezzo::Explainable::ClassMethods

Defined in:
lib/prezzo/explainable.rb

Instance Method Summary collapse

Instance Method Details

#explain_with(*options) ⇒ Object



10
11
12
13
14
15
16
# File 'lib/prezzo/explainable.rb', line 10

def explain_with(*options)
  define_method(:explain) do
    options.each_with_object({}) do |method, explanation|
      explanation[method] = send(method)
    end
  end
end