class SearchableBy::Profiles

Public Class Methods

new() click to toggle source
# File lib/searchable_by/profiles.rb, line 3
def initialize
  @profiles = {}
end

Public Instance Methods

[](name) click to toggle source
# File lib/searchable_by/profiles.rb, line 7
def [](name)
  name = name.to_sym
  @profiles[name] ||= Config.new
end
each(&block) click to toggle source
# File lib/searchable_by/profiles.rb, line 12
def each(&block)
  @profiles.each(&block)
end
initialize_copy(other) click to toggle source
# File lib/searchable_by/profiles.rb, line 16
def initialize_copy(other)
  @profiles = {}
  other.each do |name, config|
    @profiles[name] = config.dup
  end
end