Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kjunichi/cordova-plugin-mruby
mruby for cordova(iOS, Android)
https://github.com/kjunichi/cordova-plugin-mruby
cordova jni mruby
Last synced: about 1 month 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 8 years ago)
- Default Branch: master
- Last Pushed: 2016-09-26T08:40:42.000Z (over 8 years ago)
- Last Synced: 2024-10-27T11:26:41.555Z (3 months 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
[![cordova-plugin-mruby](http://img.youtube.com/vi/Mz27HAByEE4/0.jpg)](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);
```