Class: Boolminot::Clauses::Generic
- Defined in:
- lib/boolminot/clauses/generic.rb
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#opts ⇒ Object
readonly
Returns the value of attribute opts.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, body, opts = {}) ⇒ Generic
constructor
A new instance of Generic.
Methods included from Base::ClassMethods
Methods included from Base::InstanceMethods
#satisfied_by?, #to_elasticsearch, #to_elasticsearch_negated, #to_raw_bool
Constructor Details
#initialize(type, body, opts = {}) ⇒ Generic
Returns a new instance of Generic.
6 7 8 9 10 |
# File 'lib/boolminot/clauses/generic.rb', line 6 def initialize(type, body, opts = {}) @type = type.to_sym @body = body @opts = opts end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
4 5 6 |
# File 'lib/boolminot/clauses/generic.rb', line 4 def body @body end |
#opts ⇒ Object (readonly)
Returns the value of attribute opts.
4 5 6 |
# File 'lib/boolminot/clauses/generic.rb', line 4 def opts @opts end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
4 5 6 |
# File 'lib/boolminot/clauses/generic.rb', line 4 def type @type end |