module Edit
Attributes
default_editor[RW]
Public Class Methods
mate(path, line)
click to toggle source
# File lib/edit/mate.rb, line 2 def self.mate(path, line) system 'mate', path, '-l', line end
open(path, line = 0)
click to toggle source
# File lib/edit.rb, line 5 def open(path, line = 0) require "edit/#{default_editor}" self.send(default_editor.to_sym, path, line.to_s) rescue LoadError puts "No Edit: #{default_editor}" end
vim(path, line = 0)
click to toggle source
# File lib/edit/vim.rb, line 2 def self.vim(path, line = 0) system 'vim', path, "+#{line}" end