module Recorder

Constants

VERSION

Public Class Methods

active_record_protected_attributes?() click to toggle source

Returns a boolean indicating whether “protected attibutes” should be configured, e.g. attr_accessible.

# File lib/recorder.rb, line 43
def active_record_protected_attributes?
  @active_record_protected_attributes ||= !!defined?(ProtectedAttributes)
end
config() { |config| ... } click to toggle source

Returns Recorder's configuration object. @api private

# File lib/recorder.rb, line 49
def config
  @config ||= Recorder::Config.instance
  yield @config if block_given?
  @config
end
enabled=(value) click to toggle source

Switches Recorder on or off. @api public

# File lib/recorder.rb, line 18
def enabled=(value)
  Recorder.config.enabled = value
end
enabled?() click to toggle source

Returns `true` if Recorder is on, `false` otherwise. Recorder is enabled by default. @api public

# File lib/recorder.rb, line 25
def enabled?
  !!Recorder.config.enabled
end
info=(hash) click to toggle source

Sets Recorder information from the controller. @api public

# File lib/recorder.rb, line 31
def info=(hash)
  store.params.merge!(hash)
end
meta=(hash) click to toggle source

Sets Recorder meta information. @api public

# File lib/recorder.rb, line 37
def meta=(hash)
  store.params[:meta] = hash
end
store() click to toggle source

Thread-safe hash to hold Recorder's data. @api private

# File lib/recorder.rb, line 57
def store
  @store ||= Recorder::Store.new
end
version() click to toggle source

Returns version of Recorder as String

# File lib/recorder.rb, line 62
def version
  VERSION::STRING
end