lib/rocketio/controller/render/template_vars.rb in rocketio-0.0.8 vs lib/rocketio/controller/render/template_vars.rb in rocketio-0.1.0
- old
+ new
@@ -15,15 +15,15 @@
def self.define_template_vars_methods source = self
return unless source.instance_variables.include?(:@__template_vars__)
vars = source.instance_variable_get(:@__template_vars__).each_with_object(allocate.__template_vars__.dup) do |(name,value),o|
o[name] = :"__#{name}_template_var__"
if value.is_a?(Proc)
- define_method(o[name], &value)
+ private_api << define_method(o[name], &value)
else
- define_method(o[name]) {value}
+ private_api << define_method(o[name]) {value}
end
end.freeze
- define_method(:__template_vars__) {vars}
+ private_api << define_method(:__template_vars__) {vars}
end
def __template_vars__; RocketIO::EMPTY_HASH end
def template_vars