Skip to content

Instantly share code, notes, and snippets.

Created May 14, 2013 21:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save anonymous/5579699 to your computer and use it in GitHub Desktop.
Save anonymous/5579699 to your computer and use it in GitHub Desktop.
#!/usr/bin/env jruby
require 'rubygems'
require 'jbundler'
require 'java'
java_import com.netflix.hystrix.HystrixCommand
java_import com.netflix.hystrix.HystrixCommandGroupKey
class TestCommand < HystrixCommand
def initialize(name)
super(HystrixCommandGroupKey::Factory.asKey("ExampleGroup"))
@name = name
end
def run
"Hello #{@name}!"
end
end
puts TestCommand.new("mat").execute
exit(0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment