Add get, in_ and contains method to PYSON
issue9576 review319911002
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
* Add get, in_ and contains methods to PYSON
|
||||
* Manage deletable and writable state
|
||||
* Support e-mail template
|
||||
* Always encode CSV export in UTF-8
|
||||
|
||||
@@ -29,6 +29,18 @@
|
||||
types: function() {
|
||||
throw 'NotImplementedError';
|
||||
},
|
||||
get: function(k, d) {
|
||||
if (d === undefined) {
|
||||
d = '';
|
||||
}
|
||||
return Sao.PYSON.Get(this, k, d);
|
||||
},
|
||||
in_: function(obj) {
|
||||
return Sao.PYSON.In(this, obj);
|
||||
},
|
||||
contains: function(k) {
|
||||
return Sao.PYSON.In(k, this);
|
||||
},
|
||||
toString: function() {
|
||||
var klass = this.pyson().__class__;
|
||||
var args = this.__string_params__().map(Sao.PYSON.toString);
|
||||
|
||||
Reference in New Issue
Block a user