Class: Overcommit::Hook::PrePush::ProtectedBranches::Pattern

Inherits:
Struct
  • Object
show all
Defined in:
lib/overcommit/hook/pre_push/protected_branches.rb

Instance Method Summary collapse

Instance Method Details

#destructive?(ref) ⇒ Boolean

Returns:

  • (Boolean)


65
66
67
68
69
70
71
# File 'lib/overcommit/hook/pre_push/protected_branches.rb', line 65

def destructive?(ref)
  if destructive_only?
    ref.destructive?
  else
    true
  end
end