Module: Ore::Config
- Included in:
- CLI
- Defined in:
- lib/ore/config.rb
Constant Summary collapse
- @@home =
The users home directory
File.(ENV['HOME'] || ENV['HOMEPATH'])
- @@path =
Ore config directory
File.join(@@home,'.ore')
- @@options_file =
Default
ore
options file. File.join(@@path,'default.opts')
- @@templates_dir =
Custom Ore Templates directory
File.join(@@path,'templates')
- @@data_dir =
The
data/
directory for Ore File.(File.join('..','..','data'),File.dirname(__FILE__))
Class Method Summary collapse
-
.builtin_templates {|path| ... } ⇒ Object
The builtin templates.
-
.installed_templates {|path| ... } ⇒ Object
The installed templates.
Class Method Details
.builtin_templates {|path| ... } ⇒ Object
The builtin templates.
29 30 31 32 33 34 35 36 37 |
# File 'lib/ore/config.rb', line 29 def Config.builtin_templates path = File.join(@@data_dir,'ore','templates') if File.directory?(path) Dir.glob("#{path}/*") do |template| yield template if File.directory?(template) end end end |
.installed_templates {|path| ... } ⇒ Object
The installed templates.
48 49 50 51 52 53 54 |
# File 'lib/ore/config.rb', line 48 def Config.installed_templates if File.directory?(@@templates_dir) Dir.glob("#{@@templates_dir}/*") do |template| yield template if File.directory?(template) end end end |