Class: Yuriita::Definitions::Exclusive

Inherits:
Object
  • Object
show all
Defined in:
lib/yuriita/definitions/exclusive.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options:, default:) ⇒ Exclusive

Returns a new instance of Exclusive.



6
7
8
9
# File 'lib/yuriita/definitions/exclusive.rb', line 6

def initialize(options:, default:)
  @options = options
  @default = default
end

Instance Attribute Details

#defaultObject (readonly)

Returns the value of attribute default.



4
5
6
# File 'lib/yuriita/definitions/exclusive.rb', line 4

def default
  @default
end

#optionsObject (readonly)

Returns the value of attribute options.



4
5
6
# File 'lib/yuriita/definitions/exclusive.rb', line 4

def options
  @options
end

Instance Method Details

#apply(query:) ⇒ Object



11
12
13
14
15
# File 'lib/yuriita/definitions/exclusive.rb', line 11

def apply(query:)
  filter = selected_filter(query)

  Clauses::Filter.new(filters: [filter], combination: combination)
end