# File lib/safemode/scope.rb, line 9 def bind(instance_vars = {}, locals = {}, &block) @locals = symbolize_keys(locals) # why can't I just pull them to local scope in the same way like instance_vars? instance_vars = symbolize_keys(instance_vars) instance_vars.each {|key, obj| eval "@#{key} = instance_vars[:#{key}]" } @_safemode_output = '' binding end
# File lib/safemode/scope.rb, line 33 def method_missing(method, *args, &block) if @locals.has_key?(method) @locals[method] elsif @delegate_methods.include?(method) @delegate.send method, *unjail_args(args), &block else raise Safemode::SecurityError.new(method, "#<Safemode::ScopeObject>") end end
# File lib/safemode/scope.rb, line 29 def output @_safemode_output end
# File lib/safemode/scope.rb, line 25 def print(*args) @_safemode_output += args.to_s end
Generated with the Darkfish Rdoc Generator 2.