layervault/psd.rb — pull request #31 by rstacruz (2013-09-16 22:04:19+00:00)
Title: Fix 'undefined method' error encountered with layer masks

This prevents errors such as these:

Encountered this with a file with a simple bitmap layer mask.

```
/Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd/channel_image.rb:69:in `parse': undefined local variable or method `channel_data' for # (NameError)
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd/layer.rb:101:in `parse_channel_image!'
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd/layer_mask.rb:59:in `block in parse'
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd/layer_mask.rb:57:in `each'
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd/layer_mask.rb:57:in `parse'
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd.rb:116:in `layer_mask'
from /Users/rsc/.rbenv/versions/2.0.0-p195/lib/ruby/gems/2.0.0/gems/psd-1.1.1/lib/psd.rb:75:in `parse!'
from /Users/rsc/tmp/psd/lib/psdtool/document.rb:12:in `initialize'
from psd.rb:5:in `new'
from psd.rb:5:in `

'
```