lotus/utils — pull request #7 by jeremyf (2014-04-26 19:30:59+00:00)
Title: Adding Lotus::Utils.load_class! convenience method

*This pull request is intended to start a conversation.*

Instead of referencing nested classes – Lotus::Utils::Class -
provide a convenience method in Lotus::Utils.

When I start thinking about calling a function on a deeply nested
class, I can't help but feel that I'm violating some principle.

Given that Lotus is a framework, would it make sense for the
underlying function call to be easier to substite out? Below is a
rough implementation of what I was thinking.

```ruby
module Lotus::Utils
def load_class!(pattern, namespace = Object, options = {})
load_container = option.fetch(:load_container) { Lotus::Utils::Class }
load_container.load!(pattern, namespace)
end
end
```

Questions:

* Is this pattern something that resonates? Would it make sense to
expose the method at the Lotus level with something like:
`Lotus.load_class!` or `Lotus.utility_to_load_class!`
* Would this pattern make sense for other Util-based classes?
* Why is Lotus::Utils::Class not a module?
* Would it make sense for Lotus::Utils::Class.load! to be a
module_function?