lib/hotcell/context.rb in hotcell-0.2.0 vs lib/hotcell/context.rb in hotcell-0.3.0

- old
+ new

@@ -44,25 +44,25 @@ default.size > 0 ? default.first : rescue_result ensure raise e if e && options[:reraise] end - def manipulator_invoke method, *arguments + def tong_invoke method, *arguments if arguments.any? - helpers.manipulator_invoke(method, *arguments) + helpers.tong_invoke(method, *arguments) else - scope.key?(method) ? scope[method] : helpers.manipulator_invoke(method) + scope.key?(method) ? scope[method] : helpers.tong_invoke(method) end end private def helpers @helpers ||= helpers_class.new end def helpers_class - @helpers_class ||= Class.new(Hotcell::Manipulator).tap do |klass| + @helpers_class ||= Class.new(Hotcell::Tong).tap do |klass| options[:helpers].each { |helper| klass.send(:include, helper) } end end end end