class CTioga2::Data::Backends::DirectBackend
Public Class Methods
new()
click to toggle source
Calls superclass method
CTioga2::Data::Backends::Backend::new
# File lib/ctioga2/data/backends/backends/direct.rb, line 41 def initialize @separator = /\s+/ @line_separator = /[;,]/ super() end
Protected Instance Methods
query_dataset(set)
click to toggle source
This is called by the architecture to get the data. It splits the set name into filename@cols, reads the file if necessary and calls get_data
# File lib/ctioga2/data/backends/backends/direct.rb, line 54 def query_dataset(set) str = set.gsub(@line_separator, "\n") io = StringIO.new(str) cols = Dvector::fancy_read(io, nil) return Dataset.new("direct", cols) end