Sha256: dd77c19cdb5504a7dfadb932753f2912c822006a714433a908be368cfe46d328
Contents?: true
Size: 711 Bytes
Versions: 3
Compression:
Stored size: 711 Bytes
Contents
require 'cobreak/version' require 'fileutils' class BaseDato $db = Sequel.sqlite $db.create_table? :database do String :text_db end def initialize(alg = nil) @alg = alg end def database(alg) var1 = File.join(Gem.path[1], "gems", "cobreak-#{CoBreak.version}", 'lib', 'cobreak', 'hash', 'hash.db') if File.exists?(var1) == false FileUtils.touch(var1) end IO.foreach(var1) {|line| line.chomp! $db[:database] << {text_db:line} } if ($db[:database].filter(text_db:alg).map(:text_db)).include?(alg) == true exit end File.open(var1, mode: 'a'){|lin| lin.puts alg } end end $datBas = BaseDato.new
Version data entries
3 entries across 3 versions & 3 rubygems
Version | Path |
---|---|
cobreaktws-1.0.4 | lib/cobreak/function_hash.rb |
cobreaktw-1.0.4 | lib/cobreak/function_hash.rb |
cobreakk-1.0.4 | lib/cobreak/function_hash.rb |