Class: Couchbase::SearchFacet::SearchFacetNumericRange
- Inherits:
-
Object
- Object
- Couchbase::SearchFacet::SearchFacetNumericRange
- Defined in:
- lib/couchbase/search_options.rb
Instance Attribute Summary collapse
- #field ⇒ String readonly
- #size ⇒ Integer
Instance Method Summary collapse
- #add(name, min, max) ⇒ Object
-
#initialize(field) {|_self| ... } ⇒ SearchFacetNumericRange
constructor
A new instance of SearchFacetNumericRange.
Constructor Details
#initialize(field) {|_self| ... } ⇒ SearchFacetNumericRange
Returns a new instance of SearchFacetNumericRange.
1303 1304 1305 1306 1307 |
# File 'lib/couchbase/search_options.rb', line 1303 def initialize(field) @field = field @ranges = [] yield self if block_given? end |
Instance Attribute Details
#field ⇒ String (readonly)
1297 1298 1299 |
# File 'lib/couchbase/search_options.rb', line 1297 def field @field end |
#size ⇒ Integer
1300 1301 1302 |
# File 'lib/couchbase/search_options.rb', line 1300 def size @size end |
Instance Method Details
#add(name, min, max) ⇒ Object
1312 1313 1314 |
# File 'lib/couchbase/search_options.rb', line 1312 def add(name, min, max) @ranges.append({name: name, min: min, max: max}) end |