Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'sqlite3'
- class Warehouse
- def initialize
- begin
- db = SQLite3::Database.new '/home/shachar/bin/RubyMine-6.3.3/bin/Warehouse.db'
- rescue SQLite3::Exception => e
- puts 'Exception occured'
- puts e
- ensure
- db.close if db
- end
- end
- def get_value
- puts db.get_first_row('select * from "Products"')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment