Add Ruby-like hash read/set syntax

This commit is contained in:
Matthias Beyer 2017-01-22 18:33:56 +01:00
parent c222213291
commit 57c266dfc8

View file

@ -268,7 +268,9 @@ pub fn setup_entryheader() -> Class {
class.define(|itself| {
itself.def("insert", r_entry_header_insert);
itself.def("set" , r_entry_header_set);
itself.def("[]=" , r_entry_header_set);
itself.def("read" , r_entry_header_get);
itself.def("[]" , r_entry_header_get);
});
class
}