Class: Serverkit::Resources::RbenvRuby
- Inherits:
-
Base
- Object
- Base
- Serverkit::Resources::RbenvRuby
- Defined in:
- lib/serverkit/resources/rbenv_ruby.rb
Constant Summary collapse
- DEFAULT_GLOBAL =
false- DEFAULT_RBENV_EXECUTABLE_PATH =
"rbenv"
Instance Method Summary collapse
-
#apply ⇒ Object
Install the specified version of Ruby with rbenv if rbenv is executable.
-
#check ⇒ true, false
Check if rbenv is executable and the specified version of Ruby is installed.
Instance Method Details
#apply ⇒ Object
Note:
Override
Install the specified version of Ruby with rbenv if rbenv is executable
17 18 19 20 21 22 23 24 25 |
# File 'lib/serverkit/resources/rbenv_ruby.rb', line 17 def apply if dependencies install_dependencies end if has_rbenv? install_specified_ruby_version unless has_specified_ruby_version? set_specified_global_version if has_invalid_global_version? end end |
#check ⇒ true, false
Note:
Override
Check if rbenv is executable and the specified version of Ruby is installed
30 31 32 |
# File 'lib/serverkit/resources/rbenv_ruby.rb', line 30 def check has_correct_dependencies? && has_rbenv? && has_specified_ruby_version? && !has_invalid_global_version? end |