Class: TiyoHw::ShellFunction

Inherits:
Object
  • Object
show all
Defined in:
lib/tiyo_hw/shell_function.rb

Constant Summary collapse

HW_FUNCTION =
"hw".freeze

Class Method Summary collapse

Class Method Details

.cmdObject



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/tiyo_hw/shell_function.rb', line 12

def self.cmd
  path = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", "exe", "tiyohw"))
  "function \#{HW_FUNCTION}() {\n URL=$1\n OUTPUT=\"$(\#{path} setup $URL)\"\n eval ${OUTPUT}\n OUTPUT=\"$(\#{path} run $PWD)\"\n eval ${OUTPUT}\n}\n"
end