Class: OpenAPISourceTools::Ordering::KeyPathOrder
- Inherits:
-
Object
- Object
- OpenAPISourceTools::Ordering::KeyPathOrder
- Includes:
- Comparable
- Defined in:
- lib/openapi/sourcetools/order.rb
Overview
Holds KeyPath and the order that was specified.
Instance Attribute Summary collapse
-
#order ⇒ Object
readonly
Returns the value of attribute order.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(key_path, order) ⇒ KeyPathOrder
constructor
A new instance of KeyPathOrder.
Constructor Details
#initialize(key_path, order) ⇒ KeyPathOrder
Returns a new instance of KeyPathOrder.
261 262 263 264 |
# File 'lib/openapi/sourcetools/order.rb', line 261 def initialize(key_path, order) @path = key_path @order = order end |
Instance Attribute Details
#order ⇒ Object (readonly)
Returns the value of attribute order.
259 260 261 |
# File 'lib/openapi/sourcetools/order.rb', line 259 def order @order end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
259 260 261 |
# File 'lib/openapi/sourcetools/order.rb', line 259 def path @path end |
Instance Method Details
#<=>(other) ⇒ Object
266 267 268 |
# File 'lib/openapi/sourcetools/order.rb', line 266 def <=>(other) @path <=> other.path end |