class ReeMapper::MapperFactory
def hash(field_name, dto: nil, **opts, &blk)
def hash(field_name, dto: nil, **opts, &blk) raise ReeMapper::Error, "invalid DSL usage" unless @mapper type = hash_from_blk(dto: dto, &blk) field = ReeMapper::Field.new(type, field_name, **opts, location: caller_locations&.first&.to_s) @mapper.add_field(field) end