2014-12-03から1日間の記事一覧
概要 String.try_convert(obj) -> String | nil 詳細 obj を String に変換を試行。 変換には Object#to_str メソッドが使われる。変換成功時: 変換後文字列 変換失敗時: nil サンプルコード require 'tbpgr_utils' class Convertable def to_str "converted…
概要 String.try_convert(obj) -> String | nil 詳細 obj を String に変換を試行。 変換には Object#to_str メソッドが使われる。変換成功時: 変換後文字列 変換失敗時: nil サンプルコード require 'tbpgr_utils' class Convertable def to_str "converted…