Class: SurrealDB::Range
- Inherits:
-
Object
- Object
- SurrealDB::Range
- Defined in:
- lib/surrealdb/models/range.rb
Instance Attribute Summary collapse
- #begin_bound ⇒ BoundIncluded, ... readonly
- #end_bound ⇒ BoundIncluded, ... readonly
Instance Method Summary collapse
- #==(other) ⇒ Object (also: #eql?)
- #hash ⇒ Object
-
#initialize(begin_bound, end_bound) ⇒ Range
constructor
A new instance of Range.
- #inspect ⇒ Object
Constructor Details
#initialize(begin_bound, end_bound) ⇒ Range
Returns a new instance of Range.
55 56 57 58 |
# File 'lib/surrealdb/models/range.rb', line 55 def initialize(begin_bound, end_bound) @begin_bound = begin_bound @end_bound = end_bound end |
Instance Attribute Details
#begin_bound ⇒ BoundIncluded, ... (readonly)
48 49 50 |
# File 'lib/surrealdb/models/range.rb', line 48 def begin_bound @begin_bound end |
#end_bound ⇒ BoundIncluded, ... (readonly)
51 52 53 |
# File 'lib/surrealdb/models/range.rb', line 51 def end_bound @end_bound end |
Instance Method Details
#==(other) ⇒ Object Also known as: eql?
60 61 62 |
# File 'lib/surrealdb/models/range.rb', line 60 def ==(other) other.is_a?(Range) && other.begin_bound == @begin_bound && other.end_bound == @end_bound end |
#hash ⇒ Object
65 66 67 |
# File 'lib/surrealdb/models/range.rb', line 65 def hash [self.class, @begin_bound, @end_bound].hash end |
#inspect ⇒ Object
69 70 71 |
# File 'lib/surrealdb/models/range.rb', line 69 def inspect "SurrealDB::Range(#{@begin_bound.inspect}..#{@end_bound.inspect})" end |