Skip to content

Commit

Permalink
Updating parts list to remove warning on over riding map
Browse files Browse the repository at this point in the history
  • Loading branch information
mikel committed Jun 15, 2010
1 parent 75f2c02 commit 9e26bfe
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/mail/parts_list.rb
Expand Up @@ -14,8 +14,17 @@ def collect
to_a
end
end

undef :map
alias_method :map, :collect

alias :collect :map
def map!
raise NoMethodError, "#map! is not defined, please call #collect and create a new PartsList"
end

def collect!
raise NoMethodError, "#collect! is not defined, please call #collect and create a new PartsList"
end

def sort!(order)
sorted = self.sort do |a, b|
Expand Down

0 comments on commit 9e26bfe

Please sign in to comment.