Sugar

master

Sugar for Swift
venj/Sugar

Sugar

Build Status Carthage compatible

Sugar for Swift -- Ruby Core sweetness and more for Swift.

If you're looking for a complete Ruby Core implementation, see this: RubyNative/SwiftRuby

Usage

You can use this project with Carthage and Swift Package Manager.

Carthage

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

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.

Documentation

  1. Install the tool

    gem install jazzy
    
  2. Generate documentation

    jazzy
    
  3. Read documentation in docs directory.

See main.swift for an example.

Known Issues

Currently, playgrounds in the sample project is not working.

Description

  • Swift Tools 4.2.0
View More Packages from this Author

Dependencies

  • None
Last updated: Fri Sep 02 2022 01:52:13 GMT-0500 (GMT-05:00)