本文簡要介紹ruby語言中 CSV.inspect
的用法。
用法
inspect → string
返回一個字符串,顯示 self
的某些屬性:
string = "Name,Value\nfoo,0\nbar,1\nbaz,2\n"
csv = CSV.new(string, headers: true)
s = csv.inspect
s # => "#<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:\",\" row_sep:\"\\n\" quote_char:\"\\\"\" headers:true>"
相關用法
- Ruby CSV.instance用法及代碼示例
- Ruby CSV.header_convert用法及代碼示例
- Ruby CSV.skip_lines用法及代碼示例
- Ruby CSV.table用法及代碼示例
- Ruby CSV.force_quotes?用法及代碼示例
- Ruby CSV.unconverted_fields?用法及代碼示例
- Ruby CSV.generate_line用法及代碼示例
- Ruby CSV.col_sep用法及代碼示例
- Ruby CSV.shift用法及代碼示例
- Ruby CSV.skip_blanks?用法及代碼示例
- Ruby CSV.read用法及代碼示例
- Ruby CSV.row_sep用法及代碼示例
- Ruby CSV.header_row?用法及代碼示例
- Ruby CSV.headers用法及代碼示例
- Ruby CSV.csv << row用法及代碼示例
- Ruby CSV.encoding用法及代碼示例
- Ruby CSV.each用法及代碼示例
- Ruby CSV.return_headers?用法及代碼示例
- Ruby CSV.converters用法及代碼示例
- Ruby CSV.line用法及代碼示例
- Ruby CSV.parse_line用法及代碼示例
- Ruby CSV.convert用法及代碼示例
- Ruby CSV.parse用法及代碼示例
- Ruby CSV.line_no用法及代碼示例
- Ruby CSV.liberal_parsing?用法及代碼示例
注:本文由純淨天空篩選整理自ruby-lang.org大神的英文原創作品 CSV.inspect。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。