diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-12-18 11:59:36 +0900 |
|---|---|---|
| committer | GitHub <[email protected]> | 2017-12-18 11:59:36 +0900 |
| commit | d9049c10fa922e6978257eaf9fa777b4f844777d (patch) | |
| tree | 935f0dde3bdccc15a0f3325c54f84ca29dc55f86 /mrbgems/mruby-method/README.md | |
| parent | bba6c9a1cefe92d5d4f11d09cfc0c48d6b207b5f (diff) | |
| parent | c0914dbb65afb5cf428bdbf3d73c8855e0b34518 (diff) | |
| download | mruby-d9049c10fa922e6978257eaf9fa777b4f844777d.tar.gz mruby-d9049c10fa922e6978257eaf9fa777b4f844777d.zip | |
Merge pull request #3904 from ksss/mruby-method
Add mruby-method
Diffstat (limited to 'mrbgems/mruby-method/README.md')
| -rw-r--r-- | mrbgems/mruby-method/README.md | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/mrbgems/mruby-method/README.md b/mrbgems/mruby-method/README.md new file mode 100644 index 000000000..5076bfbb2 --- /dev/null +++ b/mrbgems/mruby-method/README.md @@ -0,0 +1,59 @@ +mruby-method +=== + +A implementetion of class **Method** and **UnboundMethod** for mruby + +```ruby +p Enumerable.instance_method(:find_all).source_location +#=> ["mruby/mruby/mrblib/enum.rb", 148] +``` + +# Note + +`source_location` method need this configuration in build_config.rb + +```ruby +MRuby::Build.new do |conf| + enable_debug +end +``` + +# Supported Methods + +## Kernel + +- `Kernel#method` +- `Kernel#singleton_method` + +## Module + +- `Module#instance_method` + +## Method class + +- `Method#name` +- `Method#call` +- `Method#super_method` +- `Method#arity` +- `Method#unbind` +- `Method#[]` +- `Method#owner` +- `Method#receiver` +- `Method#parameters` +- `Method#source_location` +- `Method#to_proc` + +## UnboundMethod class + +- `UnboundMethod#name` +- `UnboundMethod#bind` +- `UnboundMethod#super_method` +- `UnboundMethod#arity` +- `UnboundMethod#owner` +- `UnboundMethod#parameters` +- `UnboundMethod#source_location` + +# See also + +- https://ruby-doc.org/core-2.3.3/Method.html +- https://ruby-doc.org/core-2.3.3/UnboundMethod.html |
