lib/mystique.rb in mystique-0.4.2 vs lib/mystique.rb in mystique-0.4.3

- old
+ new

@@ -6,10 +6,14 @@ require "mystique/null_context" module Mystique class Presenter + self.methods.each do |m| + eval("undef #{m}") if m.to_s.start_with?("to_") + end + def initialize(object, context) @__object__ = object @__context__ = context || self.class.context || NullContext end @@ -30,10 +34,10 @@ end def inspect "<#{self.class}(#{target.inspect}) context: #{context.inspect}>" end - + private def method_missing(method, *args, &block) return target.send(method, *args, &block) if method.to_s.start_with?("to_") value = target.send(method, *args, &block)