Class: Optimus::Reader

Inherits:
Object
  • Object
show all
Defined in:
lib/optimus_reader.rb,
lib/excel_parser.rb,
lib/raw_tab_parser.rb,
lib/tabfile_parser.rb,
lib/log_file_parser.rb,
lib/eprimetab_parser.rb

Overview

A class that should open any type of E-Prime text file and read it into an E-Prime data structure.

Defined Under Namespace

Classes: ExcelParser, LogfileParser, OptimustabParser, RawTabParser, TabfileParser

Constant Summary collapse

PARSERS =
[LogfileParser, ExcelParser, OptimustabParser, RawTabParser]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input = nil, options = {}) ⇒ Reader

Returns a new instance of Reader.



27
28
29
30
# File 'lib/optimus_reader.rb', line 27

def initialize(input = nil, options = {})
  @options = options || {}
  set_input(input) unless input.nil?
end

Instance Attribute Details

#inputObject

Returns the value of attribute input.



22
23
24
# File 'lib/optimus_reader.rb', line 22

def input
  @input
end

#optionsObject

Returns the value of attribute options.



23
24
25
# File 'lib/optimus_reader.rb', line 23

def options
  @options
end

#parserObject (readonly)

Returns the value of attribute parser.



22
23
24
# File 'lib/optimus_reader.rb', line 22

def parser
  @parser
end

#typeObject (readonly)

Returns the value of attribute type.



22
23
24
# File 'lib/optimus_reader.rb', line 22

def type
  @type
end

Instance Method Details

#optimus_dataObject



36
37
38
39
# File 'lib/optimus_reader.rb', line 36

def optimus_data
  @optimus_data ||= @parser.to_optimus
  return @optimus_data
end