Class: Optimus::Reader
- Inherits:
-
Object
- Object
- Optimus::Reader
- 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
-
#input ⇒ Object
Returns the value of attribute input.
-
#options ⇒ Object
Returns the value of attribute options.
-
#parser ⇒ Object
readonly
Returns the value of attribute parser.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(input = nil, options = {}) ⇒ Reader
constructor
A new instance of Reader.
- #optimus_data ⇒ Object
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, = {}) = || {} set_input(input) unless input.nil? end |
Instance Attribute Details
#input ⇒ Object
Returns the value of attribute input.
22 23 24 |
# File 'lib/optimus_reader.rb', line 22 def input @input end |
#options ⇒ Object
Returns the value of attribute options.
23 24 25 |
# File 'lib/optimus_reader.rb', line 23 def end |
#parser ⇒ Object (readonly)
Returns the value of attribute parser.
22 23 24 |
# File 'lib/optimus_reader.rb', line 22 def parser @parser end |
#type ⇒ Object (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_data ⇒ Object
36 37 38 39 |
# File 'lib/optimus_reader.rb', line 36 def optimus_data @optimus_data ||= @parser.to_optimus return @optimus_data end |