class MetaCommit::Extension::RubySupport::Diffs::ModuleDeletion

Public Instance Methods

string_representation() click to toggle source
# File lib/meta_commit_ruby_support/diffs/module_deletion.rb, line 9
def string_representation
  if change_context.old_contextual_ast.target_node.is_module?
    return "remove module #{change_context.old_contextual_ast.target_node.module_name}"
  end
  "remove module #{name_of_context_module(change_context.old_contextual_ast)}"
end
supports_change(context) click to toggle source
# File lib/meta_commit_ruby_support/diffs/module_deletion.rb, line 3
def supports_change(context)
  context.type == MetaCommit::Extension::RubySupport::Diffs::Diff::TYPE_DELETION &&
      contextual_ast_has_target_node(context.old_contextual_ast) &&
      (context.old_contextual_ast.target_node.is_module? || is_name_of_module?(context.old_contextual_ast))
end