Class: Dude::Config
- Inherits:
-
Object
- Object
- Dude::Config
- Defined in:
- lib/dude/config.rb
Constant Summary collapse
- FILE_NAME =
'.duderc.yml'
Class Method Summary collapse
-
.configure_with(path_to_yaml_file) ⇒ Object
Configure through yaml file.
- .style_prompt(text) ⇒ Object
Class Method Details
.configure_with(path_to_yaml_file) ⇒ Object
Configure through yaml file
8 9 10 11 12 |
# File 'lib/dude/config.rb', line 8 def self.configure_with(path_to_yaml_file) YAML.safe_load(IO.read(path_to_yaml_file), [Symbol]) rescue StandardError {} end |
.style_prompt(text) ⇒ Object
14 15 16 |
# File 'lib/dude/config.rb', line 14 def self.style_prompt(text) "#{'=>'.green.bold} #{text}" end |