Line | |
---|
1 | mruby-method
|
---|
2 | ===
|
---|
3 |
|
---|
4 | A implementetion of class **Method** and **UnboundMethod** for mruby
|
---|
5 |
|
---|
6 | ```ruby
|
---|
7 | p Enumerable.instance_method(:find_all).source_location
|
---|
8 | #=> ["mruby/mruby/mrblib/enum.rb", 148]
|
---|
9 | ```
|
---|
10 |
|
---|
11 | # Note
|
---|
12 |
|
---|
13 | `source_location` method need this configuration in build_config.rb
|
---|
14 |
|
---|
15 | ```ruby
|
---|
16 | MRuby::Build.new do |conf|
|
---|
17 | enable_debug
|
---|
18 | end
|
---|
19 | ```
|
---|
20 |
|
---|
21 | # Supported Methods
|
---|
22 |
|
---|
23 | ## Kernel
|
---|
24 |
|
---|
25 | - `Kernel#method`
|
---|
26 | - `Kernel#singleton_method`
|
---|
27 |
|
---|
28 | ## Module
|
---|
29 |
|
---|
30 | - `Module#instance_method`
|
---|
31 |
|
---|
32 | ## Method class
|
---|
33 |
|
---|
34 | - `Method#name`
|
---|
35 | - `Method#call`
|
---|
36 | - `Method#super_method`
|
---|
37 | - `Method#arity`
|
---|
38 | - `Method#unbind`
|
---|
39 | - `Method#[]`
|
---|
40 | - `Method#owner`
|
---|
41 | - `Method#receiver`
|
---|
42 | - `Method#parameters`
|
---|
43 | - `Method#source_location`
|
---|
44 | - `Method#to_proc`
|
---|
45 |
|
---|
46 | ## UnboundMethod class
|
---|
47 |
|
---|
48 | - `UnboundMethod#name`
|
---|
49 | - `UnboundMethod#bind`
|
---|
50 | - `UnboundMethod#super_method`
|
---|
51 | - `UnboundMethod#arity`
|
---|
52 | - `UnboundMethod#owner`
|
---|
53 | - `UnboundMethod#parameters`
|
---|
54 | - `UnboundMethod#source_location`
|
---|
55 |
|
---|
56 | # See also
|
---|
57 |
|
---|
58 | - https://ruby-doc.org/core-2.3.3/Method.html
|
---|
59 | - https://ruby-doc.org/core-2.3.3/UnboundMethod.html
|
---|
Note:
See
TracBrowser
for help on using the repository browser.