https://github.com/kjunichi/cordova-plugin-mruby
mruby for cordova(iOS, Android)
https://github.com/kjunichi/cordova-plugin-mruby
cordova jni mruby
Last synced: 5 months ago
JSON representation
mruby for cordova(iOS, Android)
- Host: GitHub
- URL: https://github.com/kjunichi/cordova-plugin-mruby
- Owner: kjunichi
- License: other
- Created: 2016-09-15T01:56:53.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-09-26T08:40:42.000Z (over 9 years ago)
- Last Synced: 2025-02-07T17:25:33.047Z (about 1 year ago)
- Topics: cordova, jni, mruby
- Language: C
- Homepage:
- Size: 25 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: license.txt
Awesome Lists containing this project
README
# cordova-plugin-mruby
[](http://www.youtube.com/watch?v=Mz27HAByEE4)
# install
```shell
cordova plugin install https://github.com/kjunichi/cordova-plugin-mruby.git
```
# Usage
## HTML
```html
puts "Hello,mruby!"
i=gets
puts 123.to_s + " mruby i=#{i}"
```
## JavaScript
```javascript
const success = function(message) {
//alert(message);
}
const failure = function() {
alert("Error calling Hello Plugin");
}
const script = document.getElementById("rubyscript").value;
const stdout = document.getElementById("stdout");
mruby.mrbLoadString(script, stdout, success, failure);
```