Class: Til::NoteEditor
- Inherits:
-
Object
- Object
- Til::NoteEditor
- Defined in:
- lib/til/services/note_editor.rb
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Class Method Summary collapse
Instance Method Summary collapse
- #edit ⇒ Object
-
#initialize(note) ⇒ NoteEditor
constructor
A new instance of NoteEditor.
Constructor Details
#initialize(note) ⇒ NoteEditor
Returns a new instance of NoteEditor.
5 6 7 |
# File 'lib/til/services/note_editor.rb', line 5 def initialize(note) @path = note.path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
3 4 5 |
# File 'lib/til/services/note_editor.rb', line 3 def path @path end |
Class Method Details
.open(note) ⇒ Object
9 10 11 |
# File 'lib/til/services/note_editor.rb', line 9 def self.open(note) self.new(note) end |
Instance Method Details
#edit ⇒ Object
13 14 15 |
# File 'lib/til/services/note_editor.rb', line 13 def edit system(EDITOR, path) end |