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-1.1.3 ext/resource_generator.sh
convection-1.1.2 ext/resource_generator.sh
convection-1.1.1 ext/resource_generator.sh
convection-1.1.0 ext/resource_generator.sh
convection-1.0.7 ext/resource_generator.sh
convection-1.0.6 ext/resource_generator.sh
convection-1.0.5 ext/resource_generator.sh
convection-1.0.4 ext/resource_generator.sh
convection-1.0.3 ext/resource_generator.sh
convection-1.0.2 ext/resource_generator.sh
convection-1.0.1 ext/resource_generator.sh
convection-1.0.0.pre.beta.10 ext/resource_generator.sh
convection-1.0.0.pre.beta.9 ext/resource_generator.sh
convection-1.0.0.pre.beta.8 ext/resource_generator.sh
convection-1.0.0.pre.beta.7 ext/resource_generator.sh
convection-1.0.0.pre.beta.6 ext/resource_generator.sh
convection-1.0.0.pre.beta.4 ext/resource_generator.sh
convection-1.0.0.pre.beta.1 ext/resource_generator.sh
convection-0.4.3 ext/resource_generator.sh
convection-0.4.2 ext/resource_generator.sh