https://github.com/maxvol/swiftdsl
Core method(s) for writing Swift DSL.
https://github.com/maxvol/swiftdsl
Last synced: 10 months ago
JSON representation
Core method(s) for writing Swift DSL.
- Host: GitHub
- URL: https://github.com/maxvol/swiftdsl
- Owner: maxvol
- License: mit
- Created: 2019-02-01T21:53:36.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-07-02T19:08:02.000Z (almost 6 years ago)
- Last Synced: 2025-06-18T21:41:13.716Z (12 months ago)
- Language: Swift
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SwiftDSL
Core method(s) for writing Swift DSL.
** WORK IN PROGRESS, NOT USABLE AS OF YET **
`SwiftDSL` serves as dependency for:
* https://github.com/maxvol/CoreAnimationDSL/
* https://github.com/maxvol/GameplayKitDSL/
* https://github.com/maxvol/SpriteKitDSL/
* https://github.com/maxvol/SceneKitDSL/
* https://github.com/maxvol/ARKitDSL/
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
```