Class: RailsLens::ERD::PostgresqlColumnTypeFormatter

Inherits:
ColumnTypeFormatter show all
Defined in:
lib/rails_lens/erd/postgresql_column_type_formatter.rb

Instance Method Summary collapse

Methods inherited from ColumnTypeFormatter

format, #initialize

Constructor Details

This class inherits a constructor from RailsLens::ERD::ColumnTypeFormatter

Instance Method Details

#formatObject



6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rails_lens/erd/postgresql_column_type_formatter.rb', line 6

def format
  case @column.sql_type
  when /jsonb/i then 'jsonb'
  when /uuid/i then 'uuid'
  when /inet/i then 'inet'
  when /array/i then 'array'
  when /tsvector/i then 'tsvector'
  else
    super
  end
end