Method: TTY::Table::BorderOptions.from

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

.from(options) ⇒ Object

Create options instance from hash



14
15
16
17
18
19
20
21
22
23
24
# File 'lib/tty/table/border_options.rb', line 14

def self.from(options)
  return new if options.nil?

  opts = case options
         when self.class
           options.to_hash
         else
           options
         end
  new(**opts)
end