Class: AIA::Subl
Overview
lib/aia/tools/subl.rb
Constant Summary collapse
- DEFAULT_PARAMETERS =
[ "--new-window", # Open a new window "--wait", # Wait for the files to be closed before returning ].join(' ')
Instance Attribute Summary collapse
-
#command ⇒ Object
Returns the value of attribute command.
Instance Method Summary collapse
- #build_command ⇒ Object
-
#initialize(file: "") ⇒ Subl
constructor
A new instance of Subl.
- #run ⇒ Object
Methods inherited from Tools
catalog, get_meta, inherited, load_tools, #meta, meta, search_for, setup_backend, validate_tools
Constructor Details
#initialize(file: "") ⇒ Subl
Returns a new instance of Subl.
22 23 24 25 26 |
# File 'lib/aia/tools/subl.rb', line 22 def initialize(file: "") @file = file build_command end |
Instance Attribute Details
#command ⇒ Object
Returns the value of attribute command.
19 20 21 |
# File 'lib/aia/tools/subl.rb', line 19 def command @command end |
Instance Method Details
#build_command ⇒ Object
29 30 31 |
# File 'lib/aia/tools/subl.rb', line 29 def build_command @command = "#{.name} #{DEFAULT_PARAMETERS} #{@file}" end |
#run ⇒ Object
34 35 36 |
# File 'lib/aia/tools/subl.rb', line 34 def run `#{command}` end |