Class: DataSourceFactory
- Inherits:
-
Object
- Object
- DataSourceFactory
- Defined in:
- lib/data/data_source_factory.rb
Constant Summary collapse
- STRING_DATA_SOURCE =
'string'- FILE_DATA_SOURCE =
'file'
Instance Method Summary collapse
Instance Method Details
#newDataSource(dataSourceType, dataSourceValue) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/data/data_source_factory.rb', line 9 def newDataSource(dataSourceType, dataSourceValue) if (dataSourceType == STRING_DATA_SOURCE) then return StringDataSource.new(dataSourceValue) elsif (dataSourceType == FILE_DATA_SOURCE) then return FileDataSource.new(dataSourceValue) end end |