Class: Papa::Helper::Vi

Inherits:
Object
  • Object
show all
Defined in:
lib/papa/helper/vi.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeVi

Returns a new instance of Vi.



9
10
11
12
# File 'lib/papa/helper/vi.rb', line 9

def initialize
  @path = Helper::Path.generate_vi_file_path
  @branches = []
end

Instance Attribute Details

#branchesObject

Returns the value of attribute branches.



7
8
9
# File 'lib/papa/helper/vi.rb', line 7

def branches
  @branches
end

#pathObject

Returns the value of attribute path.



7
8
9
# File 'lib/papa/helper/vi.rb', line 7

def path
  @path
end

Instance Method Details

#runObject



14
15
16
17
18
19
20
21
# File 'lib/papa/helper/vi.rb', line 14

def run
  initialize_file
  prompt_vi
  read_from_file
  delete_file
  validate_branches
  branches
end