Class: Rivet::Bootstrap
- Inherits:
-
Object
- Object
- Rivet::Bootstrap
- Defined in:
- lib/rivet/bootstrap.rb
Constant Summary collapse
- TEMPLATE_SUB_DIR =
"bootstrap"
Instance Attribute Summary collapse
-
#chef_command ⇒ Object
readonly
Returns the value of attribute chef_command.
-
#chef_organization ⇒ Object
readonly
Returns the value of attribute chef_organization.
-
#environment ⇒ Object
readonly
Returns the value of attribute environment.
-
#gems ⇒ Object
readonly
Returns the value of attribute gems.
-
#run_list ⇒ Object
readonly
Returns the value of attribute run_list.
-
#template ⇒ Object
readonly
Returns the value of attribute template.
-
#template_path ⇒ Object
readonly
Returns the value of attribute template_path.
Instance Method Summary collapse
-
#initialize(bootstrap_definition = Hash.new) ⇒ Bootstrap
constructor
A new instance of Bootstrap.
- #user_data ⇒ Object
Constructor Details
#initialize(bootstrap_definition = Hash.new) ⇒ Bootstrap
Returns a new instance of Bootstrap.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/rivet/bootstrap.rb', line 8 def initialize(bootstrap_definition = Hash.new) ivars = [ 'gems','run_list','template','environment', 'config_dir','chef_organization'] ivars.each do |i| if bootstrap_definition.has_key?(i) instance_variable_set("@#{i}",bootstrap_definition[i]) end end unless bootstrap_definition.nil? @config_dir ||= "." @template ||= "default.erb" set_calculated_attrs end |
Instance Attribute Details
#chef_command ⇒ Object (readonly)
Returns the value of attribute chef_command.
6 7 8 |
# File 'lib/rivet/bootstrap.rb', line 6 def chef_command @chef_command end |
#chef_organization ⇒ Object (readonly)
Returns the value of attribute chef_organization.
6 7 8 |
# File 'lib/rivet/bootstrap.rb', line 6 def chef_organization @chef_organization end |
#environment ⇒ Object (readonly)
Returns the value of attribute environment.
5 6 7 |
# File 'lib/rivet/bootstrap.rb', line 5 def environment @environment end |
#gems ⇒ Object (readonly)
Returns the value of attribute gems.
5 6 7 |
# File 'lib/rivet/bootstrap.rb', line 5 def gems @gems end |
#run_list ⇒ Object (readonly)
Returns the value of attribute run_list.
5 6 7 |
# File 'lib/rivet/bootstrap.rb', line 5 def run_list @run_list end |
#template ⇒ Object (readonly)
Returns the value of attribute template.
5 6 7 |
# File 'lib/rivet/bootstrap.rb', line 5 def template @template end |
#template_path ⇒ Object (readonly)
Returns the value of attribute template_path.
6 7 8 |
# File 'lib/rivet/bootstrap.rb', line 6 def template_path @template_path end |
Instance Method Details
#user_data ⇒ Object
25 26 27 |
# File 'lib/rivet/bootstrap.rb', line 25 def user_data @user_data ||= generate_user_data end |