#405 ✓resolved
MadRabbit

Class super calls with modules

Reported by MadRabbit | November 13th, 2010 @ 01:37 PM | in 2.2.0 Release

Current implementation of Class assumes that super calls work only with parent classes as it is normally in java. But in our beloved Ruby we can use super calls with functionality injection feature. That would be great to be able to do the same in RightJS as well.

var Klass = new Class({
  include: [
    {method: function() { return 1; }},
    {method: function() { return this.$super() + 1; }}
  ],

  method: function() {
    return this.$super() + 2;
  }
});

var klass = new Klass();
klass.method(); // -> 4 (1 + 1 + 2)

kinda like that

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

RightJS Core Tickets

Shared Ticket Bins

People watching this ticket

Pages