Sha256: 2a3ff65e6cf47349f051b16ec2029b31fa90f781d333161e194b68fdb74ea074

Contents?: true

Size: 389 Bytes

Versions: 12

Compression:

Stored size: 389 Bytes

Contents

module WLang
  class Scope
    class BindingScope < Scope

      def fetch(key, dialect = nil, unfound = nil)
        subject.eval(key.to_s)
      rescue NameError
        safe_parent.fetch(key, dialect, unfound)
      end

      def inspect
        "BindingScope(#{subject.inspect})"
      end
      alias :to_s :inspect

    end # class ProxyScope
  end # class Scope
end # module WLang

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wlang-3.0.1 lib/wlang/scope/binding_scope.rb
wlang-3.0.0 lib/wlang/scope/binding_scope.rb
wlang-2.3.1 lib/wlang/scope/binding_scope.rb
wlang-2.3.0 lib/wlang/scope/binding_scope.rb
wlang-2.2.4 lib/wlang/scope/binding_scope.rb
wlang-2.2.3 lib/wlang/scope/binding_scope.rb
wlang-2.2.2 lib/wlang/scope/binding_scope.rb
wlang-2.2.1 lib/wlang/scope/binding_scope.rb
wlang-2.2.0 lib/wlang/scope/binding_scope.rb
wlang-2.1.2 lib/wlang/scope/binding_scope.rb
wlang-2.1.1 lib/wlang/scope/binding_scope.rb
wlang-2.1.0 lib/wlang/scope/binding_scope.rb