Class: Sanctuary::Reader
- Inherits:
-
Object
- Object
- Sanctuary::Reader
- Defined in:
- lib/sanctuary/reader.rb
Class Method Summary collapse
- .directory?(path = "") ⇒ Boolean
- .read_recipes(path = "") ⇒ Object
- .read_scripts(path = "") ⇒ Object
- .read_templates(path = "") ⇒ Object
Class Method Details
.directory?(path = "") ⇒ Boolean
18 19 20 |
# File 'lib/sanctuary/reader.rb', line 18 def self.directory?(path = "") Pathname.new(HOME_DIR + "/#{path}").directory? end |
.read_recipes(path = "") ⇒ Object
10 11 12 |
# File 'lib/sanctuary/reader.rb', line 10 def self.read_recipes(path = "") Dir.open(HOME_DIR.gsub("templates", "recipes") + "/#{path}").to_a end |
.read_scripts(path = "") ⇒ Object
14 15 16 |
# File 'lib/sanctuary/reader.rb', line 14 def self.read_scripts(path = "") Dir.open(HOME_DIR.gsub("templates", "scripts") + "/#{path}").to_a end |
.read_templates(path = "") ⇒ Object
6 7 8 |
# File 'lib/sanctuary/reader.rb', line 6 def self.read_templates(path = "") Dir.open(HOME_DIR + "/#{path}").to_a end |