Flowdock
method

try_convert

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: String
try_convert(p1) public

Try to convert obj into a String, using to_str method. Returns converted string or nil if obj cannot be converted for any reason.

String.try_convert("str")     #=> "str"
String.try_convert(/re/)      #=> nil
Show source
Register or log in to add new notes.