Method: Corto#count
- Defined in:
- lib/corto.rb
#count ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/corto.rb', line 34 def count if ! @use_db return -1 end @db = SQLite3::Database.new(@db_name) count = @db.execute("SELECT COUNT(*) FROM urls;") @db.close # output is an array of arrays... so [[int]] count.first.first end |