class DataSnapshots::Configuration

Attributes

snapshots[R]

Public Class Methods

new() click to toggle source
# File lib/data_snapshots/configuration.rb, line 7
def initialize
  @snapshots = {}
end

Public Instance Methods

register_snapshot(name:, model: true) { |snapshots[:methods]| ... } click to toggle source
# File lib/data_snapshots/configuration.rb, line 11
def register_snapshot(name:, model: true)
  return unless block_given?
  snapshots[name] = { methods: {}, model: model }
  yield snapshots[name][:methods]
end