File: polymorphism

package info (click to toggle)
ruby-bdb 0.6.6-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,652 kB
  • ctags: 4,687
  • sloc: ansic: 13,663; cpp: 8,601; ruby: 7,903; sh: 47; makefile: 18
file content (19 lines) | stat: -rw-r--r-- 551 bytes parent folder | download | duplicates (18)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<entry index='p'>
<name>Polymorphism</name>
<reference>receiver</reference>
<reference>method</reference>
<reference>object</reference>
<reference>ruby</reference>
<content>
    To define actual operation as to an ((object|Object)).

    ((Ruby)) carries it out to choose the ((method|Method)
    according to the object of the ((receiver|Receiver)).

    : Example:                              
        obj = "abc"
        print obj.length, "\n"        # => 3
        obj = [1,2,3,4]
        print obj.length, "\n"        # => 4
</content>
</entry>