Class: NewlineHw::Shell::Run
- Inherits:
-
Object
- Object
- NewlineHw::Shell::Run
- Defined in:
- lib/newline_hw/shell/run.rb
Overview
Generate a series of language specfic commands to start a project up This command will only be generated if the setup commands exectueded succesfully. It is safe to assume all files and folders are present a time of execution.
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#pwd ⇒ Object
readonly
Returns the value of attribute pwd.
Instance Method Summary collapse
- #cmd ⇒ Object
-
#initialize(pwd, config) ⇒ Run
constructor
A new instance of Run.
Constructor Details
#initialize(pwd, config) ⇒ Run
Returns a new instance of Run.
13 14 15 16 |
# File 'lib/newline_hw/shell/run.rb', line 13 def initialize(pwd, config) @pwd = pwd @config = config end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
12 13 14 |
# File 'lib/newline_hw/shell/run.rb', line 12 def config @config end |
#pwd ⇒ Object (readonly)
Returns the value of attribute pwd.
12 13 14 |
# File 'lib/newline_hw/shell/run.rb', line 12 def pwd @pwd end |
Instance Method Details
#cmd ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/newline_hw/shell/run.rb', line 18 def cmd commands = [] commands += Runners::Ruby.get_commands(pwd) commands += Runners::Javascript.get_commands(pwd) commands << "#{config.editor} ." if config.launch_editor commands.join(" && ") end |