class Pdfmdconfig
Class: Pdfmdconfig
¶ ↑
Show current default configuration of pdfmd
Public Class Methods
new(filename)
click to toggle source
Calls superclass method
Pdfmd::new
# File lib/pdfmd/pdfmdconfig.rb, line 9 def initialize(filename) super(filename) @filename = filename end
Public Instance Methods
show_config(key = '')
click to toggle source
# File lib/pdfmd/pdfmdconfig.rb, line 14 def show_config(key = '') if key.empty? self.log('debug','Showing current configuration in yaml format.') @hieradata.to_yaml elsif @hieradata.has_key?(key) self.log('debug',"Showing current configuration in yaml format, section: #{key}.") @hieradata[key].to_yaml else self.log('error',"Unknown Hiera Key used: '#{key}'.") puts 'Unknown hiera key. Abort.' abort end end