Sugar for Swift -- Ruby Core sweetness and more for Swift.
If you're looking for a complete Ruby Core implementation, see this: RubyNative/SwiftRuby
You can use this project with Carthage and Swift Package Manager.
Sugar supports iOS, OS X, tvOS and watchOS 2(?) by using Carthage. Add following line to your Cartfile:
github "venj/Sugar" ~> 0.1.0
Add both Sugar.framework and CommonCrypto.framework to your project.
Swift Package Manager only supports OS X target and Linux target for now. Add dependency code in your Package.swift:
dependencies: [
.Package(url: "https://github.com/venj/Sugar.git", versions: Version(0,1,0) ..< Version(1,0,0)),
]
If you are on Linux, you may also need to install OpenSSL library headers.
sudo apt-get install libssl-dev
Now, in your code:
import Sugar
Note: There are many extension methods missing on Linux platform as they require methods that only available on OS X. As Apple's cross-platform Foundation library expanding, these extension methods would be finally available on Linux.
-
Install the tool
gem install jazzy
-
Generate documentation
jazzy
-
Read documentation in
docs
directory.
See main.swift for an example.
Currently, playgrounds in the sample project is not working.