ROM::Mapping.build

Parsed documentation:
View on GitHub
Build ROM relations

@example
  relation = Axiom::Relation::Base.new(:users, [[:id, Integer], [:user_name, String]])
  env      = { users: relation }

  User = Class.new(OpenStruct.new)

  registry = Mapping.build(env) do
    users do
      map :id
      map :user_name, to: :name
    end
  end

  registry[:users]
  # #<ROM::Relation:0x000000025d3160>

@param [Environment] rom environment
@param [Schema] rom schema

@return [Hash]

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