Skip to content

Commit

Permalink
Array#call → Array#invoke
Browse files Browse the repository at this point in the history
  • Loading branch information
subtleGradient committed Apr 7, 2010
1 parent 3b6a2b2 commit c8bcf5b
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Docs/Types/Array.md
Expand Up @@ -125,7 +125,7 @@ Returns an array with the named method applied to the array's contents.
### Example:

var foo = [4, 8, 15, 16, 23, 42];
var bar = foo.call('limit', 10, 30); // bar is now [10, 10, 15, 16, 23, 30]
var bar = foo.invoke('limit', 10, 30); // bar is now [10, 10, 15, 16, 23, 30]



Expand Down
4 changes: 2 additions & 2 deletions Source/Element/Element.Dimensions.js
Expand Up @@ -154,7 +154,7 @@ Element.implement({
});


[Document, Window].call('implement', {
[Document, Window].invoke('implement', {

getSize: function(){
if (Browser.opera || Browser.safari){
Expand Down Expand Up @@ -220,7 +220,7 @@ function getCompatElement(element){
//aliases
Element.alias({setPosition: 'position'}); //compatability

[Window, Document, Element].call('implement', {
[Window, Document, Element].invoke('implement', {

getHeight: function(){
return this.getSize().y;
Expand Down
2 changes: 1 addition & 1 deletion Source/Element/Element.Event.js
Expand Up @@ -18,7 +18,7 @@ Element.Properties.events = {set: function(events){
this.addEvents(events);
}};

[Element, Window, Document].call('implement', {
[Element, Window, Document].invoke('implement', {

addEvent: function(type, fn){
var events = this.retrieve('events', {});
Expand Down
4 changes: 2 additions & 2 deletions Source/Element/Element.js
Expand Up @@ -199,7 +199,7 @@ Window.implement({

});

[Document, Element].call('implement', {
[Document, Element].invoke('implement', {

getElements: function(expression){
return Slick.search(this, expression, new Elements);
Expand Down Expand Up @@ -605,7 +605,7 @@ Element.implement({hasChild: function(element){

/*</block>*/

[Element, Window, Document].call('implement', {
[Element, Window, Document].invoke('implement', {

addListener: function(type, fn){
if (type == 'unload'){
Expand Down
4 changes: 2 additions & 2 deletions Source/Types/Array.js
Expand Up @@ -16,11 +16,11 @@ provides: Array

Array.implement({

call: function(name){
invoke: function(methodName){
var args = Array.slice(arguments, 1), results = [];
for (var i = 0, j = this.length; i < j; i++){
var item = this[i];
results.push(item[name].apply(item, args));
results.push(item[methodName].apply(item, args));
}
return results;
},
Expand Down
2 changes: 1 addition & 1 deletion Source/Utilities/JSON.js
Expand Up @@ -54,7 +54,7 @@ var JSON = new Hash(this.JSON && {

});

[Hash, Array, String, Number].call('implement', {
[Hash, Array, String, Number].invoke('implement', {

toJSON: function(){
return JSON.encode(this);
Expand Down

0 comments on commit c8bcf5b

Please sign in to comment.