Class: CollaborativeFilter::Output

Inherits:
Object
  • Object
show all
Defined in:
lib/collaborative_filter/output.rb,
lib/collaborative_filter/output/yaml_adapter.rb,
lib/collaborative_filter/output/mysql_adapter.rb

Defined Under Namespace

Classes: SqlAdapter, YamlAdapter

Class Method Summary collapse

Class Method Details

.register(name, class_name) ⇒ Object



7
8
9
10
# File 'lib/collaborative_filter/output.rb', line 7

def self.register(name, class_name)
  @@adapters ||= {}
  @@adapters[name] = class_name
end

.store(options, recommendations) ⇒ Object



3
4
5
# File 'lib/collaborative_filter/output.rb', line 3

def self.store(options, recommendations)
  @@adapters[options[:type]].new(options[:options], recommendations)
end