Class: AhoyCaptain::FilterConfiguration::Filter

Inherits:
Object
  • Object
show all
Defined in:
lib/ahoy_captain/filter_configuration/filter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(label:, column:, url:, predicates: [:in, :not_in], multiple: true, position: nil) ⇒ Filter

Returns a new instance of Filter.



6
7
8
9
10
11
12
13
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 6

def initialize(label:, column:, url:, predicates: [:in, :not_in], multiple: true, position: nil)
  @column = column
  @label = label
  @url = url
  @predicates = predicates
  @multiple = multiple
  @position = position
end

Instance Attribute Details

#columnObject (readonly)

Returns the value of attribute column.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def column
  @column
end

#labelObject (readonly)

Returns the value of attribute label.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def label
  @label
end

#multipleObject (readonly)

Returns the value of attribute multiple.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def multiple
  @multiple
end

#positionObject (readonly)

Returns the value of attribute position.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def position
  @position
end

#predicatesObject (readonly)

Returns the value of attribute predicates.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def predicates
  @predicates
end

#urlObject (readonly)

Returns the value of attribute url.



4
5
6
# File 'lib/ahoy_captain/filter_configuration/filter.rb', line 4

def url
  @url
end