maxvol / SwiftDSL

Core method(s) for writing Swift DSL.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SwiftDSL

Core method(s) for writing Swift DSL.

** WORK IN PROGRESS, NOT USABLE AS OF YET **

SwiftDSL serves as dependency for:

At the moment only one method .apply() is defined.

It allows executing closures on objects of compliant classes like that:

// make class compliant
extension UIBezierPath: DSL { }

// use DSL
let line = UIBezierPath().apply {
    $0.move(to: lowerRightCorner)
    $0.addLine(to: upperLeftCorner)
    $0.addLine(to: lowerLeftCorner)
    $0.addLine(to: center)
}

Carthage config:

github "maxvol/SwiftDSL" ~> 0.0.1

About

Core method(s) for writing Swift DSL.

License:MIT License


Languages

Language:Swift 77.5%Language:Objective-C 22.5%