Class: Nginxtra::Actions::Print
- Inherits:
-
Object
- Object
- Nginxtra::Actions::Print
- Includes:
- Nginxtra::Action
- Defined in:
- lib/nginxtra/actions/print.rb
Instance Method Summary collapse
Methods included from Nginxtra::Action
Instance Method Details
#file ⇒ Object
18 19 20 |
# File 'lib/nginxtra/actions/print.rb', line 18 def file @thor.["file"] end |
#print ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/nginxtra/actions/print.rb', line 6 def print if @thor.["list"] @thor.say "Known config files:\n #{@config.files.sort.join "\n "}" elsif @thor.["compile-options"] @thor.say "Compilation options:\n #{@config.compile_options}" elsif @config.files.include?(file) @thor.say @config.file_contents(file) else @thor.say "No config file by the name '#{file}' exists!" end end |