Sha256: 048024d0bbc22a23846d9763f6e79e29657f4f9331447270be3fe1108e76fca7
Contents?: true
Size: 790 Bytes
Versions: 1
Compression:
Stored size: 790 Bytes
Contents
module GraphQL module Define class DefinedObjectProxy def initialize(target) @target = target @dictionary = target.class.dictionary end def types GraphQL::Define::TypeDefiner.instance end def method_missing(name, *args, &block) definition = @dictionary[name] if definition definition.call(@target, *args, &block) else p "Failed to find config #{name} in #{inspect}" super end end def respond_to_missing?(name, include_private = false) return true if @dictionary[name] super end def to_s inspect end def inspect "<DefinedObjectProxy #{@target} (#{@dictionary.keys})>" end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
graphql-1.2.6 | lib/graphql/define/defined_object_proxy.rb |