Class: Cheese::Controller
- Inherits:
-
Object
- Object
- Cheese::Controller
- Defined in:
- lib/controller.rb
Constant Summary collapse
- CHEESE_CONF =
"/etc/cheese/cheese.conf"
- NGINX_CONF =
'/etc/nginx/nginx.conf'
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Controller
constructor
A new instance of Controller.
Constructor Details
#initialize(options = {}) ⇒ Controller
Returns a new instance of Controller.
30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/controller.rb', line 30 def initialize(={}) # Check cheese --setup has been run unless File.exists?(CHEESE_CONF) puts "Please run cheese --setup before using any cheese actions." exit end # Need a better way of doing this, so it works in all files Cheese::Verbose.dry_run = .delete(:dry_run) Cheese::Verbose.loud = .delete(:verbose) @preferences = YAML.load(File.open(CHEESE_CONF)) @options = run_actions end |