class DataSourceFactory

Constants

FILE_DATA_SOURCE
STRING_DATA_SOURCE

Public Instance Methods

newDataSource(dataSourceType, dataSourceValue) click to toggle source
# 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