Class: Couchbase::SearchFacet::SearchFacetTerm
- Inherits:
-
Object
- Object
- Couchbase::SearchFacet::SearchFacetTerm
- Defined in:
- lib/couchbase/search_options.rb
Instance Attribute Summary collapse
- #field ⇒ String readonly
- #size ⇒ Integer
Instance Method Summary collapse
-
#initialize(field) {|_self| ... } ⇒ SearchFacetTerm
constructor
A new instance of SearchFacetTerm.
- #to_json(*args) ⇒ Object private
Constructor Details
#initialize(field) {|_self| ... } ⇒ SearchFacetTerm
Returns a new instance of SearchFacetTerm.
1256 1257 1258 1259 |
# File 'lib/couchbase/search_options.rb', line 1256 def initialize(field) @field = field yield self if block_given? end |
Instance Attribute Details
#field ⇒ String (readonly)
1250 1251 1252 |
# File 'lib/couchbase/search_options.rb', line 1250 def field @field end |
#size ⇒ Integer
1253 1254 1255 |
# File 'lib/couchbase/search_options.rb', line 1253 def size @size end |
Instance Method Details
#to_json(*args) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
1262 1263 1264 |
# File 'lib/couchbase/search_options.rb', line 1262 def to_json(*args) {field: field, size: size}.to_json(*args) end |