Sha256: 9b99443ac20fb27c774f255d6f942389aa56606da4212a884621d73d99982eeb
Contents?: true
Size: 850 Bytes
Versions: 38
Compression:
Stored size: 850 Bytes
Contents
module Access class Filter def self.search(options = {}) # Internal Admin only Call Access::Api.new.search_filters options end def self.find(filter_key, options = {}) # Internal Admin only Call Access::Api.new.find_filter filter_key, options end def self.process_batch(chunk) chunk.map { |filter| new(filter) } end def initialize(values) self.class.class_eval { attr_reader *values.keys } values.each do |attribute_name, attribute_value| self.instance_variable_set("@#{attribute_name}", attribute_value) end end def filter_key @filter_id end def name @filter_name end def json_filter YAML::load(@filter).to_json if @filter end def hash_filter YAML::load(@filter).to_hash if @filter end end end
Version data entries
38 entries across 38 versions & 1 rubygems