module Jerakia::CLI::Config

Public Class Methods

included(thor) click to toggle source
# File lib/jerakia/cli/config.rb, line 4
def self.included(thor)
  thor.class_eval do
    desc 'config <options>', 'Print the runtime configuration options'
    option :config,
           aliases: :c,
           type: :string,
           desc: 'Configuration file'
    def config
      require 'yaml'
      jerakia = Jerakia.new(:config => options[:config])
      puts jerakia.config.to_hash.to_yaml
    end
  end
end

Public Instance Methods

config() click to toggle source
# File lib/jerakia/cli/config.rb, line 11
def config
  require 'yaml'
  jerakia = Jerakia.new(:config => options[:config])
  puts jerakia.config.to_hash.to_yaml
end