ROM::Plugins::Relation::View::ClassInterface#view

Parsed documentation:
View on GitHub
Define a relation view with a specific header

With headers defined all the mappers will be inferred automatically

@example
  class Users < ROM::Relation[:sql]
    view(:by_name, [:id, :name]) do |name|
      where(name: name)
    end

    view(:listing, [:id, :name, :email]) do
      select(:id, :name, :email).order(:name)
    end
  end

@api public
Suggestions:
Please help! Open an issue on GitHub if this assessment is incorrect.