Sha256: 0c5ec05c05ac39591ab3c80a0acf1de6ca4bfde452d523bd1a008c86743c26bb

Contents?: true

Size: 458 Bytes

Versions: 1

Compression:

Stored size: 458 Bytes

Contents

require_relative "../columns"
require_relative "from_schema"
require_relative "from_structure"
require_relative "paths"

module Arable::Columns::Parser
  WARN_MESSAGE = "No schema definition found, looked in #{Arable::Columns::Paths::ALL.join(', ')}".freeze

  module_function

  def call(table_name)
    Arable::Columns::FromSchema.call(table_name) ||
      Arable::Columns::FromStructure.call(table_name) ||
      Rails.logger.warn(WARN_MESSAGE)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
arable-0.2.0 lib/arable/columns/parser.rb