Module: VER::Methods::Git

Defined in:
config/plugin/git.rb

Class Method Summary collapse

Class Method Details

.git_blame(text, count = 1) ⇒ Object



17
18
19
20
21
# File 'config/plugin/git.rb', line 17

def self.git_blame(text, count = 1)
  line = text.index(:insert).line
  from, to = line - count, line + count
  spawn_rxvt(text, "git blame #{text.filename} -L#{from},#{to}")
end

.spawn_cmd(text, command) ⇒ Object



27
28
29
# File 'config/plugin/git.rb', line 27

def self.spawn_cmd(text, command)
  `#{command} &`
end

.spawn_rxvt(text, command) ⇒ Object



23
24
25
# File 'config/plugin/git.rb', line 23

def self.spawn_rxvt(text, command)
  Preview.spawn_rxvt(command)
end