File: module_function

package info (click to toggle)
ruby-bdb 0.6.5-7
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,028 kB
  • sloc: ansic: 13,984; cpp: 8,735; ruby: 7,869; sh: 47; makefile: 9
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>