Class: ROM::SQL::Postgres::Values::Range
- Inherits:
-
Struct
- Object
- Struct
- ROM::SQL::Postgres::Values::Range
- Defined in:
- lib/rom/sql/extensions/postgres/types/range.rb
Instance Attribute Summary collapse
-
#bounds ⇒ Object
Returns the value of attribute bounds.
-
#lower ⇒ Object
Returns the value of attribute lower.
-
#upper ⇒ Object
Returns the value of attribute upper.
Instance Method Summary collapse
- #exclude_begin? ⇒ Boolean
- #exclude_end? ⇒ Boolean
-
#initialize(lower, upper, bounds = :'[)') ⇒ Range
constructor
A new instance of Range.
Constructor Details
#initialize(lower, upper, bounds = :'[)') ⇒ Range
Returns a new instance of Range.
12 13 14 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 12 def initialize(lower, upper, bounds = :'[)') super end |
Instance Attribute Details
#bounds ⇒ Object
Returns the value of attribute bounds
11 12 13 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 11 def bounds @bounds end |
#lower ⇒ Object
Returns the value of attribute lower
11 12 13 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 11 def lower @lower end |
#upper ⇒ Object
Returns the value of attribute upper
11 12 13 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 11 def upper @upper end |
Instance Method Details
#exclude_begin? ⇒ Boolean
16 17 18 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 16 def exclude_begin? bounds[0] == '(' end |
#exclude_end? ⇒ Boolean
20 21 22 |
# File 'lib/rom/sql/extensions/postgres/types/range.rb', line 20 def exclude_end? bounds[1] == ')' end |