Skip to content

Instantly share code, notes, and snippets.

@josephreynolds
Created November 2, 2011 01:55
Show Gist options
  • Save josephreynolds/1332643 to your computer and use it in GitHub Desktop.
Save josephreynolds/1332643 to your computer and use it in GitHub Desktop.
This is now throwing an error when we run chef-client -i
class Machine<
Struct.new(:name,:ipaddress,:role,:env)
def print_machine_csv
name.length==0 ? printf(",") : printf("\"%s\",", name)
address.length==0 ? printf(",") : printf("\"%s\",", address)
role.length==0 ? printf(",") : printf("\"%s\",", role)
env.length==0 ? printf(",") : printf("\"%s\",", env)
printf("\n")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment