Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k
stars
208
forks
source link
Feature: `observe!` method for creating "initial" observer [+Bonus] #460
This PR is adding observe! method that is in fact just creating observer with NSKeyValueObservingOptionInitial option. This method will help a lot with avoiding copying code form a block, when initial value must be set to receiver.
Also I've done a minor refactoring: observers blocks registration logic extracted to separate class BW::KWO::Registry.
This PR is adding
observe!
method that is in fact just creating observer withNSKeyValueObservingOptionInitial
option. This method will help a lot with avoiding copying code form a block, when initial value must be set to receiver.Also I've done a minor refactoring: observers blocks registration logic extracted to separate class
BW::KWO::Registry
.