Skip to content

Instantly share code, notes, and snippets.

@admiyo
Created March 16, 2010 16:05
Show Gist options
  • Select an option

  • Save admiyo/334148 to your computer and use it in GitHub Desktop.

Select an option

Save admiyo/334148 to your computer and use it in GitHub Desktop.
* Copyright (c) 2009 Red Hat, Inc.
package org.fedoraproject.candlepin.guice;
import java.io.Reader;
/**
* ScriptEngineProvider
*/
public class RulesReaderProvider implements Provider<Reader> {
private RulesCurator rulesCurator;
@Inject
public RulesReaderProvider(RulesCurator rulesCurator) {
super();
this.rulesCurator = rulesCurator;
}
public Reader get() {
return new StringReader(rulesCurator.getRules().getRules());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment