Sha256: f5e0bdd95b0570711e3c26678370addf6784fa4906db240e9ee7ba28c204d95f

Contents?: true

Size: 360 Bytes

Versions: 45

Compression:

Stored size: 360 Bytes

Contents

module RailsDb
  class History

    class << self

      def instance
        $history ||= []
      end

      def add(sql)
        instance.push(sql) unless last == sql
      end

      def last
        history[0]
      end

      def remove(sql)
        instance.delete(sql)
      end

      def history
        instance.reverse
      end

    end

  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
rails_db-2.4.4 lib/rails_db/history.rb
rails_db-2.4.3 lib/rails_db/history.rb
rails_db-2.4.2 lib/rails_db/history.rb
rails_db-2.4.1 lib/rails_db/history.rb
rails_db-2.4.0 lib/rails_db/history.rb
rails_db-2.3.1 lib/rails_db/history.rb
rails_db-2.3.0 lib/rails_db/history.rb
rails_db-2.2.1 lib/rails_db/history.rb
rails_db-2.2.0 lib/rails_db/history.rb
rails_db-2.1.1 lib/rails_db/history.rb
rails_db-2.1.0 lib/rails_db/history.rb
rails_db-2.0.6 lib/rails_db/history.rb
rails_db-2.0.5 lib/rails_db/history.rb
rails_db-2.0.4 lib/rails_db/history.rb
xplore-0.0.1.alpha lib/rails_db/history.rb
rails_db-2.0.3 lib/rails_db/history.rb
rails_db-2.0.2 lib/rails_db/history.rb
rails_db-2.0.1 lib/rails_db/history.rb
rails_db-2.0.0 lib/rails_db/history.rb
rails_db-1.6.0 lib/rails_db/history.rb