You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: api.rb
    path of file: ./repos/hyperstack/ruby/hyper-operation/lib/hyper-operation
    
    the code of the file until where you have to start completion: module Hyperstack
  class Operation

    def add_error(key, kind, message = nil)
      raise ArgumentError.new("Invalid kind") unles
    
      def _run(*args)
        new.instance_eval do
          @_railway.process_params(args)
          @_railway.process_validations
          @_railway.run
          # return the result from dispatch in case there is an error
          if (dispatch_result = @_railway.dispatch).rejected?
            dispatch_result
          else
            @_railway.result
          end
        end