Is this what you're looking for?
Ext.onReady(function () {
Ext.define("RuleExecutor", {
singleton: true,
displayMessage: function (msg) {
Ext.Msg.alert('Popup Message', msg[0]);
},
disableById: function (field) {
Ext.getCmp(field).setDisabled(true);
}
});
var str = 'displayMessage';
RuleExecutor[str](['bar']);
});