Module: Trains::DTO

Defined in:
lib/trains/dto/app.rb,
lib/trains/dto/field.rb,
lib/trains/dto/model.rb,
lib/trains/dto/route.rb,
lib/trains/dto/method.rb,
lib/trains/dto/rename.rb,
lib/trains/dto/callback.rb,
lib/trains/dto/migration.rb,
lib/trains/dto/controller.rb

Constant Summary collapse

App =
Data.define(:name, :controllers, :models, :helpers, :routes)
Field =
Data.define(:name, :type)
Model =
Data.define(
  :name, :fields, :version, :renamed_columns, :removed_columns, :ignored_columns
) do
  def initialize(name:, fields:, version:, renamed_columns: [],
                 removed_columns: [], ignored_columns: [])
    super(name:, fields:, version:, renamed_columns:, removed_columns:, ignored_columns:)
  end
end
Route =
Data.define(:method, :param, :options)
Method =
Data.define(:name)
Rename =
Data.define(:from, :to)
Callback =
Data.define(:method, :arguments)
Migration =
Data.define(:table_name, :modifier, :fields, :version)
Controller =
Data.define(:name, :method_list, :callbacks)