Method: TTY::Table::Header#to_field

Defined in:
lib/tty/table/header.rb

#to_field(attribute = nil) ⇒ Object

Instantiates a new field

Parameters:

  • attribute (String, Hash) (defaults to: nil)

    the attribute value to convert to field object



65
66
67
# File 'lib/tty/table/header.rb', line 65

def to_field(attribute = nil)
  Field.new(attribute)
end