Method: Milkode::FindGrep#open_database
- Defined in:
- lib/milkode/grep/findgrep.rb
#open_database ⇒ Object
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/milkode/grep/findgrep.rb', line 72 def open_database() # データベースファイル dbfile = Pathname(File.(@option.dbFile)) # データベース開く if dbfile.exist? if !@grndb || @grndb.closed? @grndb = Milkode::GroongaDatabase.new @grndb.open_file(dbfile.to_s) @documents = @grndb.documents puts "open : #{dbfile.to_s} open." unless @option.isSilent end else raise "error : #{dbfile.to_s} not found!!" end end |