Class: InteractiveEditor
Overview
Giles Bowkett, Greg Brown, and several audience members from Giles’ Ruby East presentation.
Instance Attribute Summary collapse
-
#editor ⇒ Object
Returns the value of attribute editor.
Instance Method Summary collapse
- #edit ⇒ Object
-
#initialize(editor = :vim) ⇒ InteractiveEditor
constructor
A new instance of InteractiveEditor.
Constructor Details
#initialize(editor = :vim) ⇒ InteractiveEditor
Returns a new instance of InteractiveEditor.
4 5 6 7 8 9 |
# File 'lib/interactive_editor.rb', line 4 def initialize(editor = :vim) @editor = editor.to_s if @editor == "mate" @editor = "mate -w" end end |
Instance Attribute Details
#editor ⇒ Object
Returns the value of attribute editor.
3 4 5 |
# File 'lib/interactive_editor.rb', line 3 def editor @editor end |