#!/usr/bin/env ruby require "bundler/setup" require "usable" # You can add fixtures and/or initialization code here to make experimenting # with your gem easier. You can also use a different console, if you like. # (If you use this, don't forget to add pry to your Gemfile!) # require "pry" # Pry.start module VersionKit def save_version "Saving up to #{self.class.usable_config.max_versions} versions to #{self.class.usable_config.table_name}" end def destroy_version "Deleting versions from #{self.class.usable_config.table_name}" end end class Model extend Usable usable VersionKit, only: :save_version do |config| config.max_versions = 10 config.table_name = 'custom_versions' end end require "irb" IRB.start