ANN: StrongTyping 2.0.6a

R

Ryan Pavlik

StrongTyping 2.0.6a
===================

StrongTyping is a little ruby module that provides a convenient way
for ruby methods to check parameter types, and also dynamically
query them. In addition to merely checking a single set of types,
it allows easy overloading based on a number of different templates.

For example:

require 'strongtyping'
include StrongTyping

def foo(a, b, c)
expect(a, String, b, Numeric, c, [Integer, NilClass])
...
end


def bar(*args)
overload(args, String, String) {
| s1, s2 |
...
return
}

overload(args, String, Integer) {
| s, i |
...
return
}

overload_default args
end

You can find StrongTyping at the following location:

http://mephle.org/StrongTyping/

(This has been around for awhile, but as Mephle is being released and
people may not have seen it, I decided now would be an appropriate
time.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ANN main-4.4.0 0
ANN: Sequel 3.8.0 Released 0
Issue with textbox script? 0
[ANN] main-3.0.1 0
[ANN] main-2.8.3 2
Method overload, care to improve? 8
[ANN] map-1.5.0 3
[ANN] main-4.0.0 (for avdi) 0

Members online

Forum statistics

Threads
474,125
Messages
2,570,748
Members
47,302
Latest member
MitziWragg

Latest Threads

Top