8000 GitHub - xord/cruby: CRuby Interpreter for macOS and iOS
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

xord/cruby

Repository files navigation

CRuby Interpreter for macOS and iOS

This library allows you to embed CRuby interpreter to your macOS or iOS app.

Build

How To Use

Prepare the following podfile for the Xcode project you want to use CRuby in.

platform :ios, '10.0'
pod 'CRuby', git: 'https://github.com/xord/cruby'

Run the following in a terminal.

$ CRUBY_OS=ios pod install --verbose

(Due to the long compile time, it is recommended to use the --verbose option)

Where you want to use CRuby, you can evaluate the string as follows.

CRBValue *result = [CRuby eval:@"[1, 2, 3].map {|n| n ** 2}"];
NSString *string = result.inspect;
NSLog(@"result: %@", string);

About

CRuby Interpreter for macOS and iOS

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  
0