Class: Boolminot::Clauses::Generic

Inherits:
Base
  • Object
show all
Defined in:
lib/boolminot/clauses/generic.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Base::ClassMethods

#predicate_factory

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

#bodyObject (readonly)

Returns the value of attribute body.



4
5
6
# File 'lib/boolminot/clauses/generic.rb', line 4

def body
  @body
end

#optsObject (readonly)

Returns the value of attribute opts.



4
5
6
# File 'lib/boolminot/clauses/generic.rb', line 4

def opts
  @opts
end

#typeObject (readonly)

Returns the value of attribute type.



4
5
6
# File 'lib/boolminot/clauses/generic.rb', line 4

def type
  @type
end