I think it would be cool to have ActiveSupport::OrderedOptions
accept a block that can be used for instantiating and setting basic options.
def get_options
my_options = ActiveSupport::OrderedOptions.new
my_options.one = 1
my_options
end
would more concisely become:
def get_options
ActiveSupport::OrderedOptions.new do |ops|
ops.one = 1
end
end
Thoughts?