class Draftsman::Config

Attributes

serializer[RW]
stash_drafted_changes[RW]
stash_drafted_changes?[RW]
timestamp_field[RW]
whodunnit_field[RW]

Public Class Methods

new() click to toggle source
# File lib/draftsman/config.rb, line 9
def initialize
  @timestamp_field = :created_at
  @mutex = Mutex.new
  @serializer = Draftsman::Serializers::Yaml
  @enabled = true
  @whodunnit_field = :whodunnit
  @stash_drafted_changes = true
end

Public Instance Methods

enabled() click to toggle source

Indicates whether Draftsman is on or off. Default: true.

# File lib/draftsman/config.rb, line 19
def enabled
  @mutex.synchronize { !!@enabled }
end
enabled=(enable) click to toggle source
# File lib/draftsman/config.rb, line 23
def enabled=(enable)
  @mutex.synchronize { @enabled = enable }
end