Last active
December 11, 2015 07:29
-
-
Save havenwood/4566945 to your computer and use it in GitHub Desktop.
IRC gyre007
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
test2 = { | |
:foo1 => { | |
:target => "Something1", | |
:alias => "some_alias1" | |
}, | |
:foo2 => { | |
:target => "Something2", | |
:alias => "some_alias2" | |
}, | |
:foo3 => { | |
:target => "Something3", | |
:alias => "some_alias3" | |
} | |
} | |
def generate_targets(_test2) | |
false_target = JSON.pretty_generate({:target => false}) | |
@target_hash = "" | |
_test2.each do |_, v| | |
@target_hash << JSON.pretty_generate(v) | |
end | |
@target_hash | |
end | |
dash_targets = generate_targets(test2) | |
puts dash_targets |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment