We should be able to specify something like:
Halcyon.configurable :db
which should make the following possible:
Halcyon.db = {:foo => "bar"}
Halcyon.db[:foo]
It should also make sure that it calles to_mash on Hash-like content (well, they could want a configuration setting as an Array).
This would clean up the need for writing like this:
Halcyon.config[:db] = {:foo => "bar"}
Halcyon.config[:db][:foo]
Should probably supply with something similar to this for non-configuration accessors (which effectively provides a publicly exposed API for attr_accessor with a few niceties). For example:
# Queue Server Config
Halcyon.accessor :qsc, initial_value do |new_incoming_value|
@qsc = new_incoming_value.to_mash
end
That's one of the most complex examples, but can be useful to process incoming data to normalize data, etc. Here, we make sure data has to_mash called on it, and the configurable accessor would make more sense for this, but this is a sample... it could be useful to actually create the instance of the DB as a property of Halcyon.db etc.
Leave off the block for straight-up assignment like a normal attr_accessor would. Also, the initial value is unnecessary (nil is a perfectly legitimate default value).