module Blender::Discovery

Public Instance Methods

build_discovery(type, opts = {}) click to toggle source
# File lib/blender/discovery.rb, line 24
def build_discovery(type, opts = {})
  disco_klass = Blender::Discovery.const_get(camelcase(type.to_s).to_sym)
  disco_opts = blender_config(type).merge(opts)
  disco_klass.new(symbolize(disco_opts))
end
search_with_config(type, opts = {}) click to toggle source
# File lib/blender/discovery.rb, line 30
def search_with_config(type, opts = {})
  options = opts.dup
  search_opts = options.delete(:search)
  build_discovery(type, options).search(search_opts)
end