Class: Alx::Editor
Instance Method Summary collapse
- #edit(file_name) ⇒ Object
-
#initialize(conf) ⇒ Editor
constructor
A new instance of Editor.
Methods included from Executer
Constructor Details
#initialize(conf) ⇒ Editor
Returns a new instance of Editor.
8 9 10 |
# File 'lib/alx/editor.rb', line 8 def initialize( conf ) @conf = conf end |
Instance Method Details
#edit(file_name) ⇒ Object
12 13 14 15 |
# File 'lib/alx/editor.rb', line 12 def edit( file_name ) @editor_command = @conf[ :editor ] @editor_command ? use_editor( file_name ) : use_stdin( file_name ) end |