File: module_function

package info (click to toggle)
libdb2-ruby 0.5.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,352 kB
  • ctags: 2,743
  • sloc: ansic: 11,156; ruby: 6,199; cpp: 6,064; makefile: 86; sh: 31
file content (21 lines) | stat: -rw-r--r-- 619 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
20
21
<entry index='m'>
<name>Module Function</name>
<reference>singleton method</reference>
<reference>function</reference>
<reference>method</reference>
<content>
    In the ((methods|Method)) which is used like ((function|Function)).
    the one defined both as a method of the module
    and a ((singleton method|Singleton Method)) is called module function.
    For instance, most methods of the ((|Math|)) module are the module functions.
    These methods is convenient because it can be used
    both in the form(for example)::

        Math.sqrt(2)

    and

        include Math
        sqrt(2)
</content>
</entry>