Class: JrubyMahout::DataModel
- Inherits:
-
Object
- Object
- JrubyMahout::DataModel
- Defined in:
- lib/jruby_mahout/data_model.rb
Instance Attribute Summary collapse
-
#data_model ⇒ Object
Returns the value of attribute data_model.
Instance Method Summary collapse
-
#initialize(data_model_type, params) ⇒ DataModel
constructor
A new instance of DataModel.
Constructor Details
#initialize(data_model_type, params) ⇒ DataModel
Returns a new instance of DataModel.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/jruby_mahout/data_model.rb', line 7 def initialize(data_model_type, params) case data_model_type when "file" @data_model = FileDataModel.new(java.io.File.new(params[:file_path])) when "mysql" # TODO: implement @data_model = nil when "postgres" @data_model = PostgresManager.new(params).setup_data_model(params) else @data_model = nil end end |
Instance Attribute Details
#data_model ⇒ Object
Returns the value of attribute data_model.
5 6 7 |
# File 'lib/jruby_mahout/data_model.rb', line 5 def data_model @data_model end |