Skip to content

Instantly share code, notes, and snippets.

@doudou
Created September 16, 2014 11:48
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 doudou/0ff1b3ac8f2d397c0307 to your computer and use it in GitHub Desktop.
Save doudou/0ff1b3ac8f2d397c0307 to your computer and use it in GitHub Desktop.
Fix for non-pull connection for state reading
def on_state_change(&block)
port('state').reader(:init => true, :pull => true, :type => buffer, :size => 100).on_data do |state|
block.call(obj.state_symbols[state])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment