Sha256: 4b5378ebeb05514b7dc6d6d275be1fa0e9cad2a4a5654dfd253f71269df1078a

Contents?: true

Size: 695 Bytes

Versions: 4

Compression:

Stored size: 695 Bytes

Contents

module LogBook
  def self.configure
    @configuration ||= Configuration.new
    yield(@configuration)
  end

  def self.config
    @configuration ||= Configuration.new
  end

  class Configuration
    attr_accessor :records_table_name
    attr_accessor :ignored_attributes
    attr_accessor :recording_enabled
    attr_accessor :author_method
    attr_accessor :record_squashing
    attr_accessor :skip_if_empty_actions

    def initialize
      @records_table_name = 'records'
      @ignored_attributes = [:updated_at, :created_at]
      @author_method = :current_user
      @record_squashing = false
      @recording_enabled = false
      @skip_if_empty_actions = [:update]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_log_book-1.0.0 lib/log_book/configuration.rb
rails_log_book-0.3.0 lib/log_book/configuration.rb
rails_log_book-0.2.0 lib/log_book/configuration.rb
rails_log_book-0.1.0 lib/log_book/configuration.rb