lib/evil/client/dsl/scope.rb in evil-client-0.2.3 vs lib/evil/client/dsl/scope.rb in evil-client-0.3.0
- old
+ new
@@ -1,10 +1,10 @@
module Evil::Client::DSL
# Provides a namespace for client's top-level DSL
class Scope
extend Dry::Initializer::Mixin
- option :__scope__, default: proc {}
+ option :__scope__, default: proc {}, reader: :private
# Declares a method that opens new scope inside the current one
# An instance of new scope has access to methods of its parent
#
# @param [#to_sym] name (:[]) The name of the new scope
@@ -18,17 +18,10 @@
self
end
private
- private :__scope__
-
- def respond_to_missing?(name, *)
- __scope__.respond_to? name
- end
-
def method_missing(name, *args)
- super unless respond_to? name
__scope__.send(name, *args)
end
end
end