class Sequent::Migrations::Migration
Attributes
Public Class Methods
Source
# File lib/sequent/migrations/functions.rb, line 14 def self.inherited(child_class) super class << child_class include ClassMethods end end
Calls superclass method
Source
# File lib/sequent/migrations/functions.rb, line 24 def initialize(record_class) @record_class = record_class @version = nil end
Public Instance Methods
Source
# File lib/sequent/migrations/functions.rb, line 37 def ==(other) return false unless other.class == self.class table_name == other.table_name && version == other.version end
Source
# File lib/sequent/migrations/functions.rb, line 33 def copy(with_version) self.class.create(record_class, with_version) end
Source
# File lib/sequent/migrations/functions.rb, line 43 def hash table_name.hash + (version&.hash || 0) end
Source
# File lib/sequent/migrations/functions.rb, line 29 def table_name @record_class.table_name end