Class: Datadog::Core::Configuration::Option::Precedence::Value

Inherits:
Struct
  • Object
show all
Includes:
Comparable
Defined in:
lib/datadog/core/configuration/option.rb

Overview

Represents an Option precedence level. Each precedence has a ‘numeric` value; higher values means higher precedence. `name` is for inspection purposes only.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



24
25
26
# File 'lib/datadog/core/configuration/option.rb', line 24

def name
  @name
end

#numericObject

Returns the value of attribute numeric

Returns:

  • (Object)

    the current value of numeric



24
25
26
# File 'lib/datadog/core/configuration/option.rb', line 24

def numeric
  @numeric
end

Instance Method Details

#<=>(other) ⇒ Object



27
28
29
30
31
# File 'lib/datadog/core/configuration/option.rb', line 27

def <=>(other)
  return nil unless other.is_a?(Value)

  numeric <=> other.numeric
end