Skip to content

Instantly share code, notes, and snippets.

@KrzaQ

KrzaQ/foo.rb Secret

Created November 19, 2015 10:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KrzaQ/52c313b5b90bdc633618 to your computer and use it in GitHub Desktop.
Save KrzaQ/52c313b5b90bdc633618 to your computer and use it in GitHub Desktop.
Nodes = lambda {
n = 0
Devices.map{ |device|
ret = {
label: make_readable(device['address']),
pos: '%d,%d' % [device['xPos'], device['yPos']],
id: n
}
n = n+1
ret
}
}.call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment