lib/nrser/described/resolution.rb
# Called before doing something that only make sense if the {Resolution}
# is in the process of resolving (like adding a candidate value for a type).
# 
# @private
# 
# @return [nil]
#   If everything's ok.
# 
# @raise [NRSER::ConflictError]
#   If everything is **not** ok. The error's `#context` includes a lot of 
#   useful information for figuring out where it all went wrong.
# 
Called before doing something that only make sense if the {Resolution}
is in the process of resolving (like adding a candidate value for a type).
Called before doing something that only make sense if the { Resolution } is in the process of resolving ( like adding a candidate value for a type ) .
def check_resolving! method_name, *args, &block
      state = if failed?
        "FAILED"
      elsif resolved?
        "RESOLVED"
      end
      if state
        raise NRSER::ConflictError.new \
          self.class, "has already", state,
          attempted_call: {
            method_name: method_name,
            args: args,
            block: block,
          },
          from: from,
          described: described
      end
      nil
    end
def check_resolving! method_name , * args , & block state = if failed? "FAILED" elsif resolved? "RESOLVED" end if state raise NRSER :: ConflictError . new self . class , "has already" , state , attempted_call : { method_name : method_name , args : args , block : block , } , from : from , described : described end nil end
Called before doing something that only make sense if the {Resolution}
is in the process of resolving (like adding a candidate value for a type).
Called before doing something that only make sense if the { Resolution } is in the process of resolving ( like adding a candidate value for a type ) .
If everything's ok.
If everything ' s ok .
nil
[NRSER::ConflictError] If everything is **not** ok. The error's `#context` includes a lot of useful information for figuring out where it all went wrong.
[ NRSER :: ConflictError ] If everything is ** not ** ok . The error ' s ` #context ` includes a lot of useful information for figuring out where it all went wrong .
method_name
<not_specific>
args
<not_specific>
block
<not_specific>
private
None