------art_39070_6019893.1156962070620
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

I sent this before with a big zipfile attachment including rdoc, and I
think that the mailing list rejected it due to the size of the
attachment. So I'm sending it again with just the source files.

After solving the basic problem in a few minutes, doing the "simplest
thing which could possibly work," I've spent my spare time over the
last 4 or 5 days letting features, well, creep.

I've noticed that there are two major styles of quiz respondants, some
go for brief code, others go for well-documented code sometimes with
lots of new features. I guess I fall into the latter camp.

I really used this as an exercise to explore implementing rails-like
options parameters.  The code is documented, and I've included the
html output of rdoc in the attached zip file.  There's also a test
script.

So here's my solution.  A few goodies I've added.

1) Rails style options can be used on new, to_s and a few more.
2) Option to select when the week starts, the ranges produced in to_s
will never span over a week boundary.
 I just realized that I really should let you specify the start of the
week as either a number or a name, but it's time to lay my cards on
the table, so names will have to wait until the next 'release' <G>.
3) Option to select a language.  English and French are built-in.
4) Support for ad-hoc languages, and adding new languages via a class
method, see the rdoc and testcases for examples of how to do this.
5) A DayRange is enumerable and should act like an array containing
the day numbers with the week-start fixed as Monday extension to
add options are on the 'roadmap' <G>
6) Probably some other things I'm overlooking as I type this note.

--
Rick DeNatale

My blog on Ruby
http://talklikeaduck.denhaven2.com/

------art_39070_6019893.1156962070620
Content-Type: application/x-ruby; name="day_range.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="day_range.rb"
X-Attachment-Id: f_eri1bfai

IyBUaGlzIGNsYXNzIHdhcyB3cml0dGVuIGFzIGFuIGFuc3dlciB0byBSdWJ5UXVpejkyLgojCiMg
VGhlIERheVJhbmdlLm5ldyBtZXRob2QgdGFrZXMgb25lIG9yIG1vcmUgZGF5IHNwZWNpZmljYXRp
b25zIGFzIGVpdGhlciBpbnRlZ2VycyBvciBuYXR1cmFsIGxhbmd1YWdlCiMgc3RyaW5ncyByZXBy
ZXNlbnRpbmcgZGF5IG5hbWVzLiAgQW4gaW5zdGFuY2Ugd2lsbCByZXNwb25kIHRvIHR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SAlIDcpICsgMQoJZW5kCgoJZGVmIGV4dHJhY3Rfb3B0aW9uc19mcm9tX2FyZ3MhKGFyZ3Mp
CgkJI3B1dHMgIkRlYnVnIC0gZXh0cmFjdF9vcHRpb25zX2Zyb21fYXJncyEoI3thcmdzLmluc3Bl
Y3R9KSIKCQkjcHV0cyAiICAgICAgICN7YXJncy5sYXN0LmNsYXNzfSIKCQlTdHJpbmdTeW1IYXNo
W2FyZ3MubGFzdC5raW5kX29mPyhIYXNoKSA/IGFyZ3MucG9wIDoge31dCgllbmQKCglkZWYgZGF5
X21hcF9mcm9tX29wdGlvbnMob3B0aW9ucykKCQkjcHV0cyAiRGVidWc6IGxhbmd1YWdlPSN7RGF5
UmFuZ2UubGFuZ3VhZ2VfZnJvbV9vcHRpb25zKG9wdGlvbnMpfSIKCSAgICAgICAgI3B1dHMgIglt
YXA9I3tAQGRheV9tYXBzW0RheVJhbmdlLmxhbmd1YWdlX2Zyb21fb3B0aW9ucyhvcHRpb25zKV19
IgoJCURheVJhbmdlLmdldF9vcHRpb24oOmRheV9tYXAsIG9wdGlvbnMsIEBAZGF5X21hcHNbRGF5
UmFuZ2UubGFuZ3VhZ2VfZnJvbV9vcHRpb25zKG9wdGlvbnMpXSkKCWVuZAoKCWRlZiB3ZWVrX3N0
YXJ0X2Zyb21fb3B0aW9ucyhvcHRpb25zKQoJCXdlZWtfc3RhcnQgPSBEYXlSYW5nZS5nZXRfb3B0
aW9uKDp3ZWVrX3N0YXJ0LCBvcHRpb25zLCAxKQoJCURheVJhbmdlLmNoZWNrX2FyZygoMS4uNykg
PT09IHdlZWtfc3RhcnQsIjp3ZWVrX3N0YXJ0IG11c3QgYmUgaW4gdGhlIHJhbmdlICgxLi43KSIp
CgkJd2Vla19zdGFydAoJZW5kCgplbmQK
------art_39070_6019893.1156962070620
Content-Type: application/x-ruby; name="subranges.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="subranges.rb"
X-Attachment-Id: f_eri1buy7

bW9kdWxlIEVudW1lcmFibGUKCgkjIFJldHVybiBhbiBhcnJheSBjb250YWluaW5nIHRoZSBzdWIt
cmFuZ2VzIG9mIHNvcnRlZCBjb250ZW50cyBvZiB0aGUgcmVjZWl2ZXIKCSMgRWFjaCBlbGVtZW50
IG11c3QgYmUgY29tcGFyYWJsZSwgYW5kIG11c3QgcmVzcG9uZCB0byBzdWNjCglkZWYgc3VicmFu
Z2VzCgkJcmFuZ2Vfc3RhcnQgPSByYW5nZV9lbmQgPSBuaWwKCQlzdWJyYW5nZXMgPSBbXQoJCXNl
bGYuc29ydC5lYWNoIGRvIHxlbGVtfAoJCQlpZiByYW5nZV9zdGFydC5uaWw/CgkJCQlyYW5nZV9z
dGFydCA9IHJhbmdlX2VuZCA9IGVsZW0KCQkJZWxzZQoJCQkJaWYgcmFuZ2VfZW5kLnN1Y2MgPT0g
ZWxlbQoJCQkJCXJhbmdlX2VuZCA9IGVsZW0KCQkJCWVsc2UKCQkJCQlzdWJyYW5nZXMgPDwgKHJh
bmdlX3N0YXJ0Li5yYW5nZV9lbmQpCgkJCQkJcmFuZ2Vfc3RhcnQgPSByYW5nZV9lbmQgPSBlbGVt
CgkJCQllbmQKCQkJZW5kCgkJZW5kCgkJc3VicmFuZ2VzIDw8IChyYW5nZV9zdGFydC4ucmFuZ2Vf
ZW5kKSB1bmxlc3MgcmFuZ2Vfc3RhcnQubmlsPwoJCXN1YnJhbmdlcwoJZW5kCgplbmQKCg------art_39070_6019893.1156962070620
Content-Type: application/x-ruby; name="testdayrange.rb"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="testdayrange.rb"
X-Attachment-Id: f_eri1c7de

cmVxdWlyZSAnZGF5X3JhbmdlLnJiJwpyZXF1aXJlICd0ZXN0L3VuaXQnCgpjbGFzcyBUZXN0RGF5
UmFuZ2UgPCBUZXN0OjpVbml0OjpUZXN0Q2FzZQoKCUVzcGVyYW50b01hcCA9IHsiTHVuZG8iID0+
IDEsICJMdW4iID0+IDEsICJNYXJkb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