23 Jan '14, 6pm

Sam Ruby: Ruby2js += underscore.js

Ruby2js += underscore.js Thu 23 Jan 2014 at 14:52 When compared to Ruby, JavaScript doesn’t have as much functional support built in. Underscore.js fills that gap for many. Underscore.js, in turn, was inspired by Ruby’s Enumerable module. A underscore filter (tests ) completes the mapping. In many cases, the resulting JavaScript is formed by applying a number of filter rules. For example, starting with: a.flatten!() This is first expanded to use Array.prototype.slice to ensure the update happens in place: a.splice(0, a.length, *a.flatten()) Next, the method call is rewritten to use the underscore flatten function : a.splice(0, a.length, *_.flatten(a)) Finally, as JavaScript doesn’t have a splat operator, the call is rewritten using Function.prototype.apply : a.splice.apply(a, [0, a.length].concat(_.flatten(a))) Tim Bray will be pleased to hear that Ruby2js currently maps a...

Full article: http://www.intertwingly.net/blog/2014/01/23/Ruby2js-under...

Tweets

Sam Ruby: Ruby2JS Attribute=>Property support

intertwingly.net 18 Jan '14, 6pm

Ruby2JS Attribute=>Property support Sat 18 Jan 2014 at 15:58 Ruby2JS now maps Ruby attributes to JavaScript properties: In...

Le langage Ruby:

ruby-lang.org 22 Jan '14, 8pm

Le support de Ruby 1.9.3 s'achèvera le 23 février 2015 Aujourd’hui, nous annonçons le planning de la fin du support de Rub...

Sam Ruby: Wunderbar JQuery filter

intertwingly.net 26 Jan '14, 9pm

Wunderbar JQuery filter Sun 26 Jan 2014 at 17:55 I got a suggestion to look into React.js , a JavaScript library which is ...

Awesome free Ruby Tapas with @avdi! A great exa...

everydayrails.com 24 Jan '14, 1pm

A great example of outside-in testing from Ruby Tapas January 15, 2014 Update: Avdi has generously made the Outside-In epi...

Abril Pro Ruby 2014, The Tropical Ruby Conference

ruby-lang.org 26 Jan '14, 10pm

Abril Pro Ruby 2014, The Tropical Ruby Conference Abril Pro Ruby 2014 , the third edition of the Tropical Ruby Conference,...

From HN: Ruby Gem: Convert a Ruby Hash to an XM...

rubygems.org 02 Feb '14, 9pm

No big deal. A small addition to the Ruby Hash Class, allowing a to_xml method.

Automatic Ruby 14.1.0 has been released!

rubygems.org 24 Jan '14, 6am

automatic 14.1.0 Ruby General Automation Framework install gem install automatic Download Documentation Badge Subscribe RS...

Learn Ruby Programming – 50th Batch Since 2005 ...

rubylearning.com 25 Jan '14, 3am

, a participant who just graduated, has to say – “You kindly offered me the opportunity to join your Ruby course. I’m new ...

Sam Ruby: Software in 2014:

intertwingly.net 10 Jan '14, 11am

We have a model, view, and controller on the client, seemlessly interacting with the model, view, and controller on the se...

Sam Ruby: Software in 2014

intertwingly.net 10 Jan '14, 8am

We have a model, view, and controller on the client, seemlessly interacting with the model, view, and controller on the se...