Skip to content

Instantly share code, notes, and snippets.

@muukii
Last active June 26, 2018 07:28
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save muukii/0c5c5e83d0d257fd5a7a18f9486a476b to your computer and use it in GitHub Desktop.
Save muukii/0c5c5e83d0d257fd5a7a18f9486a476b to your computer and use it in GitHub Desktop.
#! bin/sh
NAME=$1
input="${NAME}Inputs"
output="${NAME}Outputs"
protocol="${NAME}Type"
cat << EOL
protocol ${input} {
}
protocol ${output} {
}
protocol ${protocol} {
var inputs: ${input} { get }
var outputs: ${output} { get }
}
final class ${NAME}: ${protocol}, ${input}, ${output} {
// MARK: - Properties
var inputs: ${input} { return self }
var outputs: ${output} { return self }
// MARK: - Initializers
// MARK: - Functions
}
EOL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment