Sha256: 05bc9927203875043e25cff15e42b2a86654250783945f514b4553cb124232c4

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

require_relative 'BaseAction.rb'

module PPCurses

  class InsertSQLDataAction < GetDataAction

    def initialize( actions, sql, db )
      super(actions)
      @sql = sql
      @db = db
    end

    def winHeight()
       return 8 + @actions.length
    end

    def afterActions()
      preparedSql = @sql
      @actions.each do |action|
        preparedSql = preparedSql.sub("%s", action.data)
      end

      self.promptToChangeData(preparedSql)
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ppcurses-0.0.18 lib/ppcurses/actions/InsertSQLDataAction.rb
ppcurses-0.0.17 lib/ppcurses/actions/InsertSQLDataAction.rb
ppcurses-0.0.16 lib/ppcurses/actions/InsertSQLDataAction.rb