Class: AmusingGit::Config
- Inherits:
-
Object
- Object
- AmusingGit::Config
- Includes:
- PrettyPrinter
- Defined in:
- lib/amusing_git/config/config.rb
Instance Method Summary collapse
- #hooks ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #messages ⇒ Object
Methods included from PrettyPrinter
#colorize, #green, #print_error, #print_info, #print_success, #red, #yellow
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
8 9 10 |
# File 'lib/amusing_git/config/config.rb', line 8 def initialize @config = read_config end |
Instance Method Details
#hooks ⇒ Object
21 22 23 |
# File 'lib/amusing_git/config/config.rb', line 21 def hooks @config["hooks"] || [] end |
#messages ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'lib/amusing_git/config/config.rb', line 12 def = @config["messages"] if .nil? print_error("AmusingGit: messages file not found...\n") return [] end File.read().split("\n") end |