Sha256: 5daf93fdbbd9997893172e06f42f0406376d5be85ae27869b2ede1df3466f542

Contents?: true

Size: 763 Bytes

Versions: 100

Compression:

Stored size: 763 Bytes

Contents

#!/bin/bash
#
# Given content like the following passed as the first argument
# this should build the methods needed to write most of the convection
# code for you.  You will have to do some massaging of the method names,
# but this takes most of the grunt work out.
# 
# Example:
# % . ./resource_generator.sh
# or add it to your .profile
# 
# % resource_generator ""Count" : String,
#"Handle" : String,
#"Timeout" : String"
#echo $1 | sed "s/\"//g" | cut -d ':' -f 1
#echo $1 | sed "s/\"//g" | cut -d ':' -f 1 | tr -d ' ' | xargs -I {} printf "def {}\(value\)\n  property\(\'{}\', value\)\nend\n\n"


resource_generator() {
    echo $1 | sed "s/\"//g" | cut -d ':' -f 1 | tr -d ' ' | xargs -I {} printf "def {}\(value\)\n  property\(\'{}\', value\)\nend\n\n"
}

Version data entries

100 entries across 100 versions & 1 rubygems

Version Path
convection-0.4.1 ext/resource_generator.sh
convection-0.4.0 ext/resource_generator.sh
convection-0.3.3.pre.beta.1 ext/resource_generator.sh
convection-0.3.2 ext/resource_generator.sh
convection-0.3.1 ext/resource_generator.sh
convection-0.3.0 ext/resource_generator.sh
convection-0.2.34.pre.beta.1 ext/resource_generator.sh
convection-0.2.33 ext/resource_generator.sh
convection-0.2.32 ext/resource_generator.sh
convection-0.2.31 ext/resource_generator.sh
convection-0.2.30 ext/resource_generator.sh
convection-0.2.29 ext/resource_generator.sh
convection-0.2.28 ext/resource_generator.sh
convection-0.2.27 ext/resource_generator.sh
convection-0.2.26 ext/resource_generator.sh
convection-0.2.25 ext/resource_generator.sh
convection-0.2.24 ext/resource_generator.sh
convection-0.2.23 ext/resource_generator.sh
convection-0.2.22 ext/resource_generator.sh
convection-0.2.21 ext/resource_generator.sh