Define an #cmp? method based on the instance's values identified by #keys

 @return [undefined]

 @api private
328203
def define_cmp_method
      keys = @keys
      define_method(:cmp?) do |comparator, other|
        keys.all? do |key|
          __send__(key).public_send(comparator, other.__send__(key))
        end
      end
      private :cmp?
    end
702842
def key_value(options = {}, &block)
      options ||= {}

      if options[:key]
        options[:values] ||= []
        options[:values][0] = options[:key]
      end
      if options[:value]
        options[:values] ||= []
        options[:values][1] = options[:value]
      end

      options = {
          cell_1_font_style: :bold
      }.merge(options.except(:key, :value))

      cells options, &block
    end
87886
def def_set(*method_names)
      method_names.each do |method_name|
        define_singleton_method method_name do |arg = Undefined, &block|
          if arg.equal?(Undefined)
            unless block
              raise ArgumentError, "setting #{method_name}: no value and no block given"
            end
            self.config = config.with(method_name => block)
          else
            if block
              raise ArgumentError, "ambiguous invocation setting #{method_name}: give either a value or a block, not both."
            end
            self.config = config.with(method_name => arg)
          end
        end
      end
    end
517723
def inspect(*args)
      if args.first.is_a?(Hash) && args.length.eql?(1)
        args.first.each do |name, value|
          self.debug("#{name}: #{value.inspect}")
        end
      else
        args = args.map { |arg| arg.inspect }
        self.debug(*args)
      end
    end
68517
def method_missing(m, *args, &block)
      if args.any?
        args = args.first if args.length == 1
        @var << { m.to_sym => args }
        instance_variable_set "@#{m}", args
      else
        instance_variable_get "@#{m}"
      end
    end
824895
@JRubyMethod(name = "<=>")
    public static IRubyObject cmp(IRubyObject alias1, IRubyObject alias2) {
        IRubyObject str1 = (IRubyObject)((RubyObject)alias1).fastGetInstanceVariable("@name");
        IRubyObject str2 = (IRubyObject)((RubyObject)alias2).fastGetInstanceVariable("@name");
        return str1.callMethod(alias1.getRuntime().getCurrentContext(), "<=>", str2);
    }
518426
def name
      key = :name

      if @kargs.key?(key)
        value(key: key)
      else
        interrogate_object_inspect_method(key) ||
          interrogate_object(method_name: :display_name,
                             kargs: object_method_keyword_arguments)
      end
    end
1309839
def inspect
      keys = methods - Object.methods - Pipes::Context.instance_methods
      fields = keys.map { |key| "#{key}=#{public_send(key).inspect}" }
      fields << "@error=#{@error.inspect}"
      object_id_hex = '%x' % (object_id << 1)
      "#<Pipes::Context:0x00#{object_id_hex} #{fields.join(', ')}>"
    end
995666
def define_writer!(k, definition)
      define_method("#{k}=") do |value|
        # Recursively convert hash and array of hash to schematized objects
        value = ensure_schema value, definition[:schema]

        # Initial value
        instance_variable_set "@#{k}", value

        # Dirty tracking
        self.changed_attributes ||= Set.new
        self.changed_attributes << k
      end
    end
191548
def method_missing(m,*a,&b)
      m = m.to_s

      if (key = EXTRA_REGEX.match(m))
        if key['VAR'] == 'value'
          key = key['KEY'].to_i
          if VALID_EXTRA_KEY.include?(key)
            ivar = :"@#{m}"
            val = instance_variable_defined?(ivar) ? instance_variable_get(ivar) : nil
            tp = send("extra_#{key}_type")
            if tp == 'boolean'
              val = ((val === true) || (val == '1')) ? '1' : '0'
            end
            return val
          end
        end
      end

      super m, *a, &b
    end
235496
def C_Initialize(args=nil)
      case args
        when Hash
          pargs = CK_C_INITIALIZE_ARGS.new
          args.each{|k,v| pargs.send("#{k}=", v) }
        else
          pargs = args
      end
      unwrapped_C_Initialize(pargs)
    end
275851
def assigned_key(key)
      return @key_assignments[key] if @key_assignments[key]
      available_keys = @input_values.keys - @key_assignments.values
      return nil if available_keys.empty?
      if available_keys.include?(key)
        @key_assignments[key] = key
      else
        @key_assignments[key] = available_keys[rand(available_keys.length)]
      end
      @key_assignments[key]
    end
529309
def key?(host)
      Gem::Keychain.has_api_key?(host: host) || @fallback.key?(host.to_s)
    end
1226109
def method_missing(method)
      method = method.to_s
      raise NoMethodError, "No such method: #{method}" unless @args.keys.include? method
      @args[method]
    end
422611
def merge!(rel)
      return self if rel.nil?
      MULTI_VALUE_METHODS.each do |method|
        (@values[method] ||= []).concat(rel.values[method]).uniq! unless rel.values[method].nil?
      end

      MULTI_KEY_METHODS.each do |method|
        (@values[method] ||= {}).merge!(rel.values[method]) unless rel.values[method].nil?
      end

      SINGLE_VALUE_METHODS.each do |method|
        @values[method] = rel.values[method] unless rel.values[method].nil?
      end

      self
    end
440655
def options
      map = Artifactory::Configurable.keys.map do |key|
        [key, instance_variable_get(:"@#{key}")]
      end
      Hash[map]
    end
894700
def has_key?(key)
      if :hash == self.type
        self.children.any? { |pair_node| pair_node.key.to_value == key }
      else
        raise Synvert::Core::MethodNotSupported.new "has_key? is not handled for #{self.debug_info}"
      end
    end