Class: Sheets::Parsers::Base
- Inherits:
-
Object
- Object
- Sheets::Parsers::Base
show all
- Defined in:
- lib/sheets/parsers/base.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(data, format, file_path) ⇒ Base
Returns a new instance of Base.
2
3
4
5
6
|
# File 'lib/sheets/parsers/base.rb', line 2
def initialize(data, format, file_path)
@data = data
@format = format
@file_path = file_path
end
|
Class Method Details
16
17
18
|
# File 'lib/sheets/parsers/base.rb', line 16
def self.formats
@formats ||= []
end
|
20
21
22
|
# File 'lib/sheets/parsers/base.rb', line 20
def self.formats=(new_formats)
@formats = new_formats
end
|
.parses(*args) ⇒ Object
12
13
14
|
# File 'lib/sheets/parsers/base.rb', line 12
def self.parses(*args)
self.formats = args.map(&:to_s)
end
|
Instance Method Details
#io ⇒ Object
8
9
10
|
# File 'lib/sheets/parsers/base.rb', line 8
def io
StringIO.new(@data)
end
|