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



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

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

Instance Attribute Details

#inputObject

Returns the value of attribute input.



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

def input
  @input
end

#optionsObject

Returns the value of attribute options.



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

def options
  @options
end

#parserObject (readonly)

Returns the value of attribute parser.



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

def parser
  @parser
end

#typeObject (readonly)

Returns the value of attribute type.



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

def type
  @type
end

Instance Method Details

#optimus_dataObject



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

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