Class: Schemacop::ScopedEnv

Inherits:
Object
  • Object
show all
Defined in:
lib/schemacop/scoped_env.rb

Instance Method Summary collapse

Constructor Details

#initialize(delegation_object, methods, backup_binding = nil, prefix = nil) ⇒ ScopedEnv

Returns a new instance of ScopedEnv.



3
4
5
6
7
8
# File 'lib/schemacop/scoped_env.rb', line 3

def initialize(delegation_object, methods, backup_binding = nil, prefix = nil)
  @delegation_object = delegation_object
  @methods = methods
  @backup_binding = backup_binding
  @prefix = prefix
end

Instance Method Details

#respond_to_missing?(symbol, include_private = false) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/schemacop/scoped_env.rb', line 26

def respond_to_missing?(symbol, include_private = false)
  @methods.include?(symbol) || super
end