module Knocker
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/knocker.rb, line 9 def config "#{ENV["HOME"]}/.config/knocker/config" end
config_exists!()
click to toggle source
# File lib/knocker.rb, line 22 def config_exists! raise Knocker::Errors::ConfigNotFound unless config_exists? end
config_exists?()
click to toggle source
# File lib/knocker.rb, line 18 def config_exists? File.exist? config end
create_config()
click to toggle source
# File lib/knocker.rb, line 26 def create_config FileUtils.mkdir_p File.dirname(Knocker.config) FileUtils.touch Knocker.config end
pattern(name)
click to toggle source
# File lib/knocker.rb, line 13 def pattern(name) config_exists! Knocker::Parser.new(File.read(config)).find(name) end