Class: Couchbase::Cluster::SearchFacet::SearchFacetNumericRange
- Inherits:
-
Object
- Object
- Couchbase::Cluster::SearchFacet::SearchFacetNumericRange
- Defined in:
- lib/couchbase/search_options.rb,
/Users/sergey.auseyau/code/couchbase-ruby-client/lib/couchbase/search_options.rb more...
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.
1241 1242 1243 1244 1245 |
# File 'lib/couchbase/search_options.rb', line 1241 def initialize(field) @field = field @ranges = [] yield self if block_given? end |
Instance Attribute Details
#field ⇒ String (readonly)
1235 1236 1237 |
# File 'lib/couchbase/search_options.rb', line 1235 def field @field end |
#size ⇒ Integer
1238 1239 1240 |
# File 'lib/couchbase/search_options.rb', line 1238 def size @size end |
Instance Method Details
#add(name, min, max) ⇒ Object
1250 1251 1252 |
# File 'lib/couchbase/search_options.rb', line 1250 def add(name, min, max) @ranges.append({name: name, min: min, max: max}) end |