From: Josh Cheek Date: 2010-04-25T08:37:25+09:00 Subject: Defining your own typecaster --000e0cd10562c13f28048503edd2 Content-Type: text/plain; charset=ISO-8859-1 Hi, how do you define your own typecaster? Builtin examples Array(1..5) # => [1, 2, 3, 4, 5] Integer(5.2) # => 5 Float(5) # => 5.0 I would expect it to be something like this class Foo def self.()(*objs) Foo.new end end Foo(1) But that isn't valid syntax, and I'm not sure what to look up to figure this out. --000e0cd10562c13f28048503edd2--