Class: RubyShell::Executor
- Inherits:
-
Object
- Object
- RubyShell::Executor
- Defined in:
- lib/rubyshell/executor.rb
Class Method Summary collapse
- .cd(path, &block) ⇒ Object
- .chain(&block) ⇒ Object
- .method_missing(method_name, *args) ⇒ Object
- .respond_to_missing?(_name, _include_private) ⇒ Boolean
Class Method Details
.cd(path, &block) ⇒ Object
5 6 7 |
# File 'lib/rubyshell/executor.rb', line 5 def self.cd(path, &block) Dir.chdir(path, &block) end |
.chain(&block) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rubyshell/executor.rb', line 9 def self.chain(&block) result = RubyShell::ChainContext.class_eval(&block).exec_commands raise "Command Failed" unless $?.success? result end |
.method_missing(method_name, *args) ⇒ Object
17 18 19 |
# File 'lib/rubyshell/executor.rb', line 17 def self.method_missing(method_name, *args) RubyShell::Command.new(method_name, *args).exec_command end |
.respond_to_missing?(_name, _include_private) ⇒ Boolean
21 22 23 |
# File 'lib/rubyshell/executor.rb', line 21 def self.respond_to_missing?(_name, _include_private) false end |