Class: Tabby::Editor
- Inherits:
-
Object
- Object
- Tabby::Editor
- Defined in:
- lib/tabby/editor.rb
Instance Method Summary collapse
-
#initialize(project = nil) ⇒ Editor
constructor
A new instance of Editor.
- #path ⇒ Object
- #run! ⇒ Object
Constructor Details
#initialize(project = nil) ⇒ Editor
3 4 5 |
# File 'lib/tabby/editor.rb', line 3 def initialize(project=nil) @project = project end |
Instance Method Details
#path ⇒ Object
15 16 17 |
# File 'lib/tabby/editor.rb', line 15 def path TABBYDIR.join("#{@project}.rb") end |
#run! ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/tabby/editor.rb', line 7 def run! if path.exist? system("$EDITOR #{TABBYDIR.join("#{@project}.rb")}") else Tabby::Creator.new(@project).run! end end |