Class: Datadog::Core::Configuration::Option::Precedence::Value
- Inherits:
-
Object
- Object
- Datadog::Core::Configuration::Option::Precedence::Value
- 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
-
#name ⇒ Object
Returns the value of attribute name.
-
#numeric ⇒ Object
Returns the value of attribute numeric.
-
#origin ⇒ Object
Returns the value of attribute origin.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(numeric, name, origin) ⇒ Value
constructor
A new instance of Value.
Constructor Details
#initialize(numeric, name, origin) ⇒ Value
Returns a new instance of Value.
31 32 33 34 35 |
# File 'lib/datadog/core/configuration/option.rb', line 31 def initialize(numeric, name, origin) @numeric = numeric @name = name @origin = origin end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/datadog/core/configuration/option.rb', line 29 def name @name end |
#numeric ⇒ Object
Returns the value of attribute numeric.
29 30 31 |
# File 'lib/datadog/core/configuration/option.rb', line 29 def numeric @numeric end |
#origin ⇒ Object
Returns the value of attribute origin.
29 30 31 |
# File 'lib/datadog/core/configuration/option.rb', line 29 def origin @origin end |
Instance Method Details
#<=>(other) ⇒ Object
37 38 39 40 41 |
# File 'lib/datadog/core/configuration/option.rb', line 37 def <=>(other) return nil unless other.is_a?(Value) numeric <=> other.numeric end |