Class: BitcoinTestnet::Executor
- Inherits:
-
Object
- Object
- BitcoinTestnet::Executor
- Defined in:
- lib/bitcoin_testnet/executor.rb
Class Method Summary collapse
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(*commands) ⇒ Executor
constructor
A new instance of Executor.
Constructor Details
#initialize(*commands) ⇒ Executor
Returns a new instance of Executor.
8 9 10 |
# File 'lib/bitcoin_testnet/executor.rb', line 8 def initialize(*commands) @commands = commands end |
Class Method Details
.execute(*args) ⇒ Object
4 5 6 |
# File 'lib/bitcoin_testnet/executor.rb', line 4 def self.execute(*args) self.new(*args).execute end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 |
# File 'lib/bitcoin_testnet/executor.rb', line 12 def execute Dir.chdir BitcoinTestnet.dir do commands = @commands.map { |c| "#{c} > /dev/null 2>&1"} system commands.join(' && ') end end |