Elad on Rails
Ruby On Rails and a Conning Israeli entrepreneur
Sunday, September 2, 2007
Add custom operators in Ruby
Jay Phillips
developed the 'superators' gem, which enables the use of custom operators in Ruby. for example.
require
'rubygems'
require
'superators'
class
Array
superator
"<---"
do
|operand
|
self
<< operand.reverse
end
end
[
"jay"
] <---
"spillihp"
No comments:
Post a Comment
Tell me what you think
‹
›
Home
View web version
No comments:
Post a Comment
Tell me what you think