This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.trello.core.rx; | |
import rx.Observable; | |
import rx.Subscriber; | |
/** | |
* Passes control to another Observable if the source observable does not emit any items. | |
* | |
* Handy if you've a CacheObservable that does a cheap lookup and a DoHardWorkObservable that does the | |
* hard work and you want to only do the hard work if CacheObservable is empty. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def method_missing(sym, *args) | |
if(sym.to_s == "pl") | |
send(args[0], self) | |
end | |
end | |
def square ar | |
ar.map! { |i| i * i } | |
end |