class Bobkit::Scope
Public Class Methods
new(scope=nil)
click to toggle source
# File lib/bobkit/scope.rb, line 6 def initialize(scope=nil) @scope = scope || {} end
Public Instance Methods
method_missing(method_name, *arguments, &block)
click to toggle source
Calls superclass method
# File lib/bobkit/scope.rb, line 10 def method_missing(method_name, *arguments, &block) if @scope.respond_to?(:key?) and @scope.key?(method_name) @scope[method_name] elsif @scope.respond_to? method_name @scope.send method_name, *arguments else super end end
respond_to?(method_name, include_private = false)
click to toggle source
Calls superclass method
# File lib/bobkit/scope.rb, line 20 def respond_to?(method_name, include_private = false) if @scope.respond_to?(:key?) and @scope.key?(method_name) true elsif @scope.respond_to? method_name true else super end end
Also aliased as: have?