Class: AIA::Vim

Inherits:
Tools show all
Defined in:
lib/aia/tools/vim.rb

Overview

lib/aia/tools/vim.rb

Constant Summary collapse

DEFAULT_PARAMETERS =
[
  " ", # no parameters 
].join(' ')

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Tools

catalog, get_meta, inherited, load_tools, #meta, meta, search_for, setup_backend, validate_tools

Constructor Details

#initialize(file: "") ⇒ Vim

Returns a new instance of Vim.



20
21
22
23
24
# File 'lib/aia/tools/vim.rb', line 20

def initialize(file: "")
  @file     = file

  build_command
end

Instance Attribute Details

#commandObject

Returns the value of attribute command.



17
18
19
# File 'lib/aia/tools/vim.rb', line 17

def command
  @command
end

Instance Method Details

#build_commandObject



27
28
29
# File 'lib/aia/tools/vim.rb', line 27

def build_command
  @command = "#{meta.name} #{DEFAULT_PARAMETERS} #{@file}"
end

#runObject



32
33
34
35
36
37
# File 'lib/aia/tools/vim.rb', line 32

def run
  # Using 'system' instead of backticks becuase
  # with the back ticks vim was complaining that it
  # was not connected to a terminal.
  system command
end