Class: MaglevRecord::ReversedSuperclassMismatchChange
Instance Method Summary
collapse
#changes_since, #nothing_changed?, #superclass_mismatch_class_names, #superclass_mismatch_classes
Constructor Details
106
107
108
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 106
def initialize(superclass_mismatch_change)
@superclass_mismatch_change = superclass_mismatch_change
end
|
Instance Method Details
#class_name ⇒ Object
122
123
124
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 122
def class_name
superclass_mismatch_change.mismatching_class
end
|
#file_path ⇒ Object
126
127
128
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 126
def file_path
superclass_mismatch_change.file_path
end
|
#migration_string(identation = 0) ⇒ Object
134
135
136
137
138
139
140
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 134
def migration_string(identation = 0)
" " * identation + [
"# TypeError: superclass mismatch for #{class_name}",
"# in #{file_path}",
"#{class_name}.change_superclass_to #{old_superclass.name}"
].join("\n" + " " * identation)
end
|
#mismatching_class ⇒ Object
118
119
120
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 118
def mismatching_class
superclass_mismatch_change.mismatching_class
end
|
#old_superclass ⇒ Object
130
131
132
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 130
def old_superclass
mismatching_class.superclass
end
|
114
115
116
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 114
def reversed
superclass_mismatch_change
end
|
#superclass_mismatch_change ⇒ Object
110
111
112
|
# File 'lib/maglev_record/snapshot/superclass_mismatch_change.rb', line 110
def superclass_mismatch_change
@superclass_mismatch_change
end
|