Sha256: aefe174494b168b7496584e7b28fde0565815fbf74d411bbbb665d00419e4f4d

Contents?: true

Size: 398 Bytes

Versions: 1

Compression:

Stored size: 398 Bytes

Contents

module Cans
  class Historian
    attr_accessor :enabled
    def initialize
      try_history
    end

    def delve
      reload_history if enabled
    end

    private
    def reload_history
      ActiveSupport::Dependencies.history.each { |f| load f }
    end

    def try_history
      ActiveSupport::Dependencies.history
      enabled = true
    rescue
      enabled = false
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cans-0.1.1 lib/cans/historian.rb