ROM::Attribute#prefixed

Parsed documentation:
View on GitHub
Return new attribute type with an alias using provided prefix

@example
  class Users < ROM::Relation[:memory]
    schema do
      attribute :id, Types::Int
      attribute :name, Types::String
    end
  end

  prefixed_id = Users.schema[:id].prefixed

  prefixed_id.aliased?
  # => true

  prefixed_id.name
  # => :id

  prefixed_id.alias
  # => :users_id

  prefixed_id = Users.schema[:id].prefixed(:user)

  prefixed_id.alias
  # => :user_id

@param [Symbol] prefix The prefix (defaults to source.dataset)

@return [Attribute]

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