lib/mystique.rb in mystique-0.10.2 vs lib/mystique.rb in mystique-1.0.0

- old
+ new

@@ -1,15 +1,17 @@ require "mystique/version" require "callable" require "mystique/undefined" +require "mystique/presenter_class" require "mystique/presenter" module Mystique + def self.present(object, with: nil, context: nil, &block) begin - presenter_class = presenter_class_for(object, with) + presenter_class = PresenterClass.new(object, with).to_class presenter_class.for(object, context, &block) rescue NameError return object end end