lib/prezzo/explainable.rb in prezzo-0.5.0 vs lib/prezzo/explainable.rb in prezzo-0.5.1
- old
+ new
@@ -28,10 +28,10 @@
explained_components.each do |component, options|
value = send(component)
if self.class.respond_to?(:components) && self.class.components.include?(component)
value = cached_components[component]
end
- value = value.explain if value.respond_to?(:explain) && options.fetch(:resursive, true)
+ value = value.explain if value.respond_to?(:explain) && options.fetch(:recursive, true)
value = value.calculate if value.respond_to?(:calculate)
explanation[:components][component] = value
end
explanation