Class: Access::Filter

Inherits:
Object
  • Object
show all
Includes:
MuchMeta
Defined in:
lib/access/filter.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from MuchMeta

#set_up_methods, #set_values

Constructor Details

#initialize(values) ⇒ Filter

Returns a new instance of Filter.



19
20
21
22
23
# File 'lib/access/filter.rb', line 19

def initialize(values)
  @used_fields = []
  set_up_methods(values)
  set_values(values)
end

Class Method Details

.find(filter_key, options = {}) ⇒ Object



10
11
12
13
# File 'lib/access/filter.rb', line 10

def self.find(filter_key, options = {})
  # Internal Admin only Call
  Access::Api.new.find_filter filter_key, options
end

.process_batch(chunk) ⇒ Object



15
16
17
# File 'lib/access/filter.rb', line 15

def self.process_batch(chunk)
  chunk.map { |filter| new(filter) }
end

.search(options = {}) ⇒ Object



5
6
7
8
# File 'lib/access/filter.rb', line 5

def self.search(options = {})
  # Internal Admin only Call
  Access::Api.new.search_filters options
end

Instance Method Details

#filter_keyObject



25
26
27
# File 'lib/access/filter.rb', line 25

def filter_key
  @filter_id
end

#nameObject



29
30
31
# File 'lib/access/filter.rb', line 29

def name
  @filter_name
end