Model objects consist of properties and the methods that manipulate them
Models are initialized by init
so that getter and setter pairs are made
When setter functions are called, the model's observers are notified
1 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | proto object
$ remove_observer :function (., observer)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 86 45 92 27 45 27 86 92
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ setattr :function (., key, value, notify_private = TRUE)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 116 37 122 27 37 27 116 122
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ class : chr [1:2] "Model" "TraitR"
$ init :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 128 34 139 27 34 27 128 139
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ list_observers :function (.)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 97 41 97 64 41 64 97 97
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ getattr :function (., key)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 107 37 107 70 37 70 107 107
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ add_observer :function (., observer)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 71 42 80 27 42 27 71 80
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
$ notify_observers:function (., key = NULL, value = NA, old_value = NA, notify_private = TRUE)
..- attr(*, "srcref")=Class 'srcref' atomic [1:8] 47 46 64 27 46 27 47 64
.. .. ..- attr(*, "srcfile")=Classes 'srcfilecopy', 'srcfile' <environment: 0x7fc266bf3298>
parent: proto object
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.