Class: CiHelper::Installer
- Inherits:
-
Object
- Object
- CiHelper::Installer
- Defined in:
- lib/ci_helper/installer.rb
Overview
Responsible for create the setting file in the git repo
Instance Attribute Summary collapse
-
#target ⇒ Object
readonly
Returns the value of attribute target.
-
#user_setting ⇒ Object
readonly
Returns the value of attribute user_setting.
Instance Method Summary collapse
-
#initialize(target, user_setting) ⇒ Installer
constructor
A new instance of Installer.
- #install_ci_helper_config ⇒ Object
Constructor Details
#initialize(target, user_setting) ⇒ Installer
Returns a new instance of Installer.
7 8 9 10 |
# File 'lib/ci_helper/installer.rb', line 7 def initialize(target, user_setting) @target = target @user_setting = user_setting end |
Instance Attribute Details
#target ⇒ Object (readonly)
Returns the value of attribute target.
5 6 7 |
# File 'lib/ci_helper/installer.rb', line 5 def target @target end |
#user_setting ⇒ Object (readonly)
Returns the value of attribute user_setting.
5 6 7 |
# File 'lib/ci_helper/installer.rb', line 5 def user_setting @user_setting end |
Instance Method Details
#install_ci_helper_config ⇒ Object
12 13 14 15 16 17 |
# File 'lib/ci_helper/installer.rb', line 12 def install_ci_helper_config ci_config_file = File.join(target, CiHelper::CONFIG_FILE_NAME) result = File.open(ci_config_file, 'w') { |f| f.write(user_setting.to_yaml)} puts 'intialize success You can run the montior now ' if result end |