Class: Teamocil::Layout
- Inherits:
-
Object
- Object
- Teamocil::Layout
- Defined in:
- lib/teamocil/layout.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.print_available_layouts(directory: nil) ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/teamocil/layout.rb', line 19 def self.print_available_layouts(directory: nil) files = Dir.glob(File.join(directory, '*.yml')) files.map! do |file| extname = File.extname(file) File.basename(file).gsub(extname, '') end # Always return files in alphabetical order, even if `Dir.glob` almost # always does it files.sort! Teamocil.puts(files) end |
Instance Method Details
#edit! ⇒ Object
15 16 17 |
# File 'lib/teamocil/layout.rb', line 15 def edit! Teamocil.system("$EDITOR #{path}") end |