lib/graphql/define/instance_definable.rb
# Run the definition block if it hasn't been run yet.
# This can only be run once: the block is deleted after it's used.
# You have to call this before using any value which could
# come from the definition block.
# @return [void]
Run the definition block if it hasn't been run yet.
This can only be run once: the block is deleted after it's used.
You have to call this before using any value which could
come from the definition block.
Run the definition block if it hasn ' t been run yet . This can only be run once : the block is deleted after it ' s used . You have to call this before using any value which could come from the definition block .
def ensure_defined
        if @pending_definition
          defn = @pending_definition
          @pending_definition = nil
          revive_dependent_methods
          begin
            defn_proxy = DefinedObjectProxy.new(self)
            defn.define_keywords.each do |keyword, value|
              defn_proxy.public_send(keyword, value)
            end
            if defn.define_proc
              defn_proxy.instance_eval(&defn.define_proc)
            end
          rescue StandardError
            stash_dependent_methods
            @pending_definition = defn
            raise
          end
        end
        nil
      end
def ensure_defined if @pending_definition defn = @pending_definition @pending_definition = nil revive_dependent_methods begin defn_proxy = DefinedObjectProxy . new ( self ) defn . define_keywords . each do | keyword , value | defn_proxy . public_send ( keyword , value ) end if defn . define_proc defn_proxy . instance_eval ( & defn . define_proc ) end rescue StandardError stash_dependent_methods @pending_definition = defn raise end end nil end
Run the definition block if it hasn't been run yet.
Run the definition block if it hasn ' t been run yet .
# Apply definition from `define(...)` kwargs # and/or apply definition from `define { ... }` block # The definition block failed to run, so make this object pending again:
None
void