Sha256: 868075952af3dbc9e2b8425ff46289b27d34fde5d4373be469754d06c2ce6c04

Contents?: true

Size: 263 Bytes

Versions: 4

Compression:

Stored size: 263 Bytes

Contents

require 'singleton'

module RailsLiveDashboard
  class Context
    include Singleton

    def start
      @batch_id = SecureRandom.uuid
    end

    def batch_id
      @batch_id ||= SecureRandom.uuid
    end

    def reset
      @batch_id = nil
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_live_dashboard-0.2.0 lib/rails_live_dashboard/context.rb
rails_live_dashboard-0.1.2 lib/rails_live_dashboard/context.rb
rails_live_dashboard-0.1.1 lib/rails_live_dashboard/context.rb
rails_live_dashboard-0.1.0 lib/rails_live_dashboard/context.rb