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.
1158 1159 1160 1161 1162 |
# File 'lib/couchbase/search_options.rb', line 1158 def initialize(field) @field = field @ranges = [] yield self if block_given? end |
Instance Attribute Details
#field ⇒ String (readonly)
1152 1153 1154 |
# File 'lib/couchbase/search_options.rb', line 1152 def field @field end |
#size ⇒ Integer
1155 1156 1157 |
# File 'lib/couchbase/search_options.rb', line 1155 def size @size end |
Instance Method Details
#add(name, min, max) ⇒ Object
1167 1168 1169 |
# File 'lib/couchbase/search_options.rb', line 1167 def add(name, min, max) @ranges.append({name: name, min: min, max: max}) end |