Skip to content

Commit

Permalink
add clear function
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsavio committed Mar 16, 2016
1 parent 1af1a84 commit 5598ba2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hansel/crumb.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ def clear_pattern(self, arg_name):
""" Clear the pattern of the given argument `arg_name`."""
self.set_pattern(arg_name, '')

def clear(self, arg_name):
""" Clear the value of the given argument `arg_name`."""
del self._argval[arg_name]

@property
def arg_values(self):
""" Return a dict with the arg_names and values of the already replaced crumb arguments."""
Expand Down

0 comments on commit 5598ba2

Please sign in to comment.