Class: Wsv::RangeRequest::Result
- Inherits:
-
Object
- Object
- Wsv::RangeRequest::Result
- Defined in:
- lib/wsv/range_request.rb
Instance Attribute Summary collapse
-
#bounds ⇒ Object
readonly
Returns the value of attribute bounds.
Class Method Summary collapse
Instance Method Summary collapse
- #full? ⇒ Boolean
-
#initialize(kind:, bounds: nil) ⇒ Result
constructor
A new instance of Result.
- #partial? ⇒ Boolean
- #unsatisfiable? ⇒ Boolean
Constructor Details
#initialize(kind:, bounds: nil) ⇒ Result
Returns a new instance of Result.
11 12 13 14 |
# File 'lib/wsv/range_request.rb', line 11 def initialize(kind:, bounds: nil) @kind = kind @bounds = bounds end |
Instance Attribute Details
#bounds ⇒ Object (readonly)
Returns the value of attribute bounds.
9 10 11 |
# File 'lib/wsv/range_request.rb', line 9 def bounds @bounds end |
Class Method Details
.full ⇒ Object
28 29 30 |
# File 'lib/wsv/range_request.rb', line 28 def self.full new(kind: :full) end |
.partial(bounds) ⇒ Object
32 33 34 |
# File 'lib/wsv/range_request.rb', line 32 def self.partial(bounds) new(kind: :partial, bounds: bounds) end |
.unsatisfiable ⇒ Object
36 37 38 |
# File 'lib/wsv/range_request.rb', line 36 def self.unsatisfiable new(kind: :unsatisfiable) end |
Instance Method Details
#full? ⇒ Boolean
16 17 18 |
# File 'lib/wsv/range_request.rb', line 16 def full? @kind == :full end |
#partial? ⇒ Boolean
20 21 22 |
# File 'lib/wsv/range_request.rb', line 20 def partial? @kind == :partial end |
#unsatisfiable? ⇒ Boolean
24 25 26 |
# File 'lib/wsv/range_request.rb', line 24 def unsatisfiable? @kind == :unsatisfiable end |