module StructureConflictResolver::StructureType

Public Class Methods

from(text_blob) click to toggle source
# File lib/structure_conflict_resolver/structure_type.rb, line 6
def self.from(text_blob)
  klass = case text_blob
  when /INSERT INTO schema_migrations/ then OldSchool
  when /\(\'\d{5,14}\'\)[,; ]?/        then Modern
  else                                      Unresolvable
  end

  klass.new(text_blob)
end