Module: Makitzo::SSH::Commands::Ruby
- Included in:
- Makitzo::SSH::Context
- Defined in:
- lib/makitzo/ssh/commands/ruby.rb
Instance Method Summary collapse
Instance Method Details
#require_ruby! ⇒ Object
14 15 16 |
# File 'lib/makitzo/ssh/commands/ruby.rb', line 14 def require_ruby! raise CommandFailed unless ruby_version end |
#ruby_version ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/makitzo/ssh/commands/ruby.rb', line 3 def ruby_version ruby_version_check = exec("#{host.read_merged(:ruby_command) || 'ruby'} -v") if ruby_version_check.error? logger.warn "Ruby executable '#{host.ruby_command}' not found" false else logger.success "Ruby executable located" true end end |