crepe/crepe — pull request #52 by davidcelis (2014-07-17 23:44:23+00:00)
Title: Rename Crepe::API.scope to config

The naming behind `scope` is, I think, a bit confusing. The real result
of a `scope` is that you end up with a more fine-grained configuration
for the duration of a block. In fact, it simply calls `scoped` on the
current namespace's Config object. The additional fact that `scope`
doesn't even need to accept a block or namespace argument makes me think
we should rename it to `config`. For instance, you can simply call it to
set configuration options in the current namespace:

```ruby
class API < Crepe::API
config separators: %w[ / . ? # ]

# ...
end
```

I think that the name `config` is more descriptive of what the method is
actually doing: altering the Config object for a block or the current
namespace. We can leave `scope` in as an alias (as I've currently done)
or remove it entirely.

It's also worth mentioning that I can't really think of a good case for
using `config` to set a configuration option without a block, since it
usually makes sense to do in a call to `namespace` with options (I think
`namespace` is more readable than `scope` or `config` in instances where
a namespace argument is provided). So perhaps we should leave that
undocumented until we have more configuration options or can think of a
more compelling case than `separators`.

Signed-off-by: David Celis