Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyClass
- extend Forwardable
- def_delegators :@broker, :add
- def subscribe_in_broker
- @subscribers.map(&method(:add))
- end
- end
- def subscribe_in_broker
- @subscribers.map{|k,v| add(k,v) }
- end
Add Comment
Please, Sign In to add comment