Class: TiyoHw::Runners::Javascript

Inherits:
Base
  • Object
show all
Defined in:
lib/tiyo_hw/runners/javascript.rb

Instance Attribute Summary

Attributes inherited from Base

#commands, #pwd

Instance Method Summary collapse

Methods inherited from Base

#add_command, #file?, #file_contents?, #file_path, get_commands, #initialize

Constructor Details

This class inherits a constructor from TiyoHw::Runners::Base

Instance Method Details

#npm?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/tiyo_hw/runners/javascript.rb', line 4

def npm?
  file?("package.json")
end

#prepare_commandsObject



8
9
10
# File 'lib/tiyo_hw/runners/javascript.rb', line 8

def prepare_commands
  add_command "npm install" if npm?
end