lib/ppcurses/actions/InsertSQLDataAction.rb in ppcurses-0.0.14 vs lib/ppcurses/actions/InsertSQLDataAction.rb in ppcurses-0.0.15

- old
+ new

@@ -1,25 +1,28 @@ -require "curses" +require 'ppcurses/actions/BaseAction.rb' +module PPCurses -class InsertSQLDataAction < GetDataAction + class InsertSQLDataAction < GetDataAction - def initialize( actions , sql, db ) - super(actions) - @sql = sql - @db = db - end + def initialize( actions, sql, db ) + super(actions) + @sql = sql + @db = db + end - def winHeight() - return 7 + @actions.length - end + def winHeight() + return 7 + @actions.length + end - def afterActions() - preparedSql = @sql - @actions.each do |action| - preparedSql = preparedSql.sub("%s", action.data) + def afterActions() + preparedSql = @sql + @actions.each do |action| + preparedSql = preparedSql.sub("%s", action.data) + end + + self.promptToChangeData(preparedSql) end - self.promptToChangeData(preparedSql) end end