Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Table
- def initialize(res, meth, db)
- puts %[Struct.new(#{meth}, #{(db.table_info(meth).collect {|x| x["name"] }).join(",")})]
- end
- end
- ##############################################################################################
- [11] pry(main)> Table.new(db.execute "SELECT * FROM Actions", "Actions", db)
- #SQLite3::RangeException: bind or column index out of range
- #from /usr/local/lib/ruby/gems/1.9.1/gems/sqlite3-1.3.6/lib/sqlite3/statement.rb:41:in #`bind_param'
- ##############################################################################################
- [12] pry(main)> puts %[Struct.new(#{meth}, #{(db.table_info(meth).collect {|x| x["name"] }).join(",")})]
- Struct.new(Actions, Action,Reaction,Return)
- => nil
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement