Created
May 14, 2013 21:27
-
-
Save anonymous/5579699 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#!/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