Module: GraphQL::Delegate
- Included in:
- Backtrace, Execution::Lazy::LazyMethodMap::ConcurrentishMap, NonNullType, Query, Query::Arguments, Query::Context, Query::Context::FieldResolutionContext, Query::NullContext, Query::Result, Query::Variables, Schema::MiddlewareChain, StaticValidation::DefinitionDependencies::NodeWithPath, StaticValidation::ValidationContext
- Defined in:
- lib/graphql.rb
Overview
Ruby stdlib was pretty busted until this fix: https://bugs.ruby-lang.org/issues/13111 https://github.com/ruby/ruby/commit/46c0e79bb5b96c45c166ef62f8e585f528862abb#diff-43adf0e587a50dbaf51764a262008d40
Instance Method Summary collapse
Instance Method Details
#def_delegators(accessor, *method_names) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/graphql.rb', line 13 def def_delegators(accessor, *method_names) method_names.each do |method_name| class_eval <<-RUBY def #{method_name}(*args) if block_given? #{accessor}.#{method_name}(*args, &Proc.new) else #{accessor}.#{method_name}(*args) end end RUBY end end |