Class: Shoji

Inherits:
Object
  • Object
show all
Defined in:
lib/shoji_main.rb

Defined Under Namespace

Classes: Base, CSV, Excel, ODS, TSV, TextBase, UTF8File

Instance Method Summary collapse

Constructor Details

#initialize(filename, opts = {}, &block) ⇒ Shoji

Returns a new instance of Shoji.



23
24
25
26
27
28
29
# File 'lib/shoji_main.rb', line 23

def initialize(filename, opts = {}, &block)
  @filename = filename
  @opts = opts
  if block_given?
    yield(self)
  end
end

Instance Method Details

#foreach(opts = {}, &block) ⇒ Object



30
31
32
# File 'lib/shoji_main.rb', line 30

def foreach(opts = {}, &block)
  self.clcass.foreach(@filename, opts, &block)
end

#row_size(opts = {}) ⇒ Object



40
41
42
# File 'lib/shoji_main.rb', line 40

def row_size(opts = {})
  self.class.row_size(@filename, opts)
end

#rows(opts = {}) ⇒ Object



43
44
45
# File 'lib/shoji_main.rb', line 43

def rows(opts = {})
  self.class.rows(@filename, opts)
end

#valid_content?(opts = {}) ⇒ Boolean

Returns:

  • (Boolean)


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

def valid_content?(opts = {})
  self.class.valid_content?(@filename, opts)
end

#valid_file?(opts = {}) ⇒ Boolean

Returns:

  • (Boolean)


33
34
35
# File 'lib/shoji_main.rb', line 33

def valid_file?(opts = {})
  self.class.valid_file?(@filename, opts)
end