What about something like this:

```ruby
def schema(&block)
  @schema ||= Schema.build(repositories)
  @schema.call(&block) if block
  @schema
end
```

I'm not sure if the block is optional in `Schema.build`, but maybe if it defaults to an empty `Proc` it might work?