Class: TryRb::Config
Constant Summary collapse
- FILE_NAME =
'.tryrbrc'
Instance Attribute Summary collapse
-
#path ⇒ Object
Returns the value of attribute path.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #load_file ⇒ Object
Constructor Details
Instance Attribute Details
#path ⇒ Object
Returns the value of attribute path.
6 7 8 |
# File 'lib/tryrb/config.rb', line 6 def path @path end |
Instance Method Details
#load_file ⇒ Object
26 27 28 29 30 31 |
# File 'lib/tryrb/config.rb', line 26 def load_file require 'yaml' YAML.load_file(@path) rescue Errno::ENOENT default_config end |