首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > JavaScript > JavaScript的面向对象风格的红宝石

JavaScript的面向对象风格的红宝石

资 源 简 介

Inheritance.js Inheritance.js is a plugin for the Prototype Javascript library that provides developers with a complete, unobtrusive, Ruby inspired, classical inheritance model. Using Inheritance.js, developers are given the power to easily define classes, sub-classes, and mix-ins, with a sprinkle of syntax sugar. The process of overriding methods is simplified; Inheritance.js uses a properly scoped parent method that is made available only inside an overriding method. To top it off, Inheritance.js accomplishes all this without adding any additional properties or methods to the developer"s instantiated objects. ``` Person = Class.extend({ // adding a mixin include: Sortable, // initializer function initialize: function(name) { this.name = name; }, // ... methods ... toString: function() { return this.name; } }); Employee = Class.extend(Person, { // adding mixins include: [Sortable, OtherModule]

文 件 列 表

inheritance-2.7
dist
doc
LICENSE
._Rakefile
Rakefile
src
test
vendor

相 关 资 源

您 可 能 感 兴 趣 的

同 类 别 推 荐

VIP VIP
  • 开心快活人 11分钟前 成为了本站会员

  • 晋财 1小时前 成为了本站会员

  • WYG 1天前 成为了本站会员

  • Shine 1天前 成为了本站会员

  • 柳贻 1天前 成为了本站会员

  • hallelujah_HL 1天前 成为了本站会员

  • 焦昱贺 1天前 成为了本站会员

  • Rubin 1天前 成为了本站会员

  • Li 2天前 成为了本站会员

  • bigfatcat1977 3天前 成为了本站会员

0.267246s