Method: MyMatrix#initialize

Defined in:
lib/mymatrix.rb

#initialize(file = nil, opts = {}) ⇒ MyMatrix

コンストラクタ

Args

file

オープンするファイル。

Return

生成されたMyMatrixオブジェクト



30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/mymatrix.rb', line 30

def initialize(file=nil, opts={})
  #内部改行コード。
  @internal_lf = '<br>'
  rnd = rand(9999)
  i = 0
  begin
    @log = Logger.new("MyMatrix_ERR_#{i}.log")
  rescue
    i += 1
    retry
  end
  @log.level = Logger::DEBUG
   if(FileIO.filesystem == 's')
     @file  = MyMatrix.toutf8(file.to_s)
   else
     @file  = file
  end

   @mx = LoaderFactory.load(@file, opts)


  @headers = @mx.shift
  registerMatrix
  return self
end