Class: Executable
- Inherits:
-
Object
- Object
- Executable
- Defined in:
- lib/devlogs/executable.rb
Class Method Summary collapse
-
.open(path) ⇒ Object
Opens the file at
path
using system editor.
Instance Method Summary collapse
-
#initialize ⇒ Executable
constructor
A new instance of Executable.
-
#open(path) ⇒ Object
Opens the file contained at the path.
Constructor Details
#initialize ⇒ Executable
Returns a new instance of Executable.
4 5 6 |
# File 'lib/devlogs/executable.rb', line 4 def initialize raise NotImplementedError, "Abstract class" end |
Class Method Details
.open(path) ⇒ Object
Opens the file at path
using system editor
17 18 19 20 21 |
# File 'lib/devlogs/executable.rb', line 17 def open(path) session = new session.open(path) end |
Instance Method Details
#open(path) ⇒ Object
Opens the file contained at the path
9 10 11 12 13 |
# File 'lib/devlogs/executable.rb', line 9 def open(path) command = "#{@program} #{path}" system command end |