Class: Yap::Configuration
- Inherits:
-
Object
- Object
- Yap::Configuration
- Defined in:
- lib/yap/configuration.rb
Instance Attribute Summary collapse
-
#addon_paths ⇒ Object
Returns the value of attribute addon_paths.
-
#rcfiles ⇒ Object
Returns the value of attribute rcfiles.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #path_for(part) ⇒ Object
- #yap_path ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
14 15 16 17 18 19 20 21 22 23 |
# File 'lib/yap/configuration.rb', line 14 def initialize @addon_paths = [ "#{File.dirname(__FILE__)}/../../addons", "#{ENV['HOME']}/.yap/addons" ] @rcfiles = [ "#{ENV['HOME']}/.yaprc" ] end |
Instance Attribute Details
#addon_paths ⇒ Object
Returns the value of attribute addon_paths.
11 12 13 |
# File 'lib/yap/configuration.rb', line 11 def addon_paths @addon_paths end |
#rcfiles ⇒ Object
Returns the value of attribute rcfiles.
12 13 14 |
# File 'lib/yap/configuration.rb', line 12 def rcfiles @rcfiles end |
Instance Method Details
#path_for(part) ⇒ Object
25 26 27 |
# File 'lib/yap/configuration.rb', line 25 def path_for(part) yap_path.join(part) end |
#yap_path ⇒ Object
29 30 31 |
# File 'lib/yap/configuration.rb', line 29 def yap_path Pathname.new "#{ENV['HOME']}/.yap" end |