Class: Babushka::TemplatedDepContext

Inherits:
DepContext show all
Defined in:
lib/babushka/templated_dep_context.rb

Instance Attribute Summary

Attributes inherited from DepDefiner

#block, #dependency, #payload

Class Method Summary collapse

Instance Method Summary collapse

Methods included from UriHelpers

#handle_source, #process_sources, #setup_source_uris, #uri_processor

Methods included from GitHelpers

git, git_update, update_and_log

Methods inherited from DepDefiner

#basename, #failed?, #get_source_location_for, #initialize, #invoke, #load_path, #loaded?, #met, #name, #result, #source_location, #source_location_for, #unmeetable, #unmeetable!, #unmet

Methods included from LogHelpers

debug, deprecated!, log, log_block, log_error, log_ok, log_stderr, log_warn, removed!

Methods included from ShellHelpers

cmd_dir, current_username, log_shell, login_shell, raw_shell, shell, shell!, shell?, shell_cmd, sudo, which

Methods included from PathHelpers

cd, in_build_dir, in_download_dir

Methods included from RunHelpers

#_by_babushka, #added_by_babushka, #append_to_file, #babushka_config?, #bundle_rake, #change_line, #change_with_sed, #check_file, #edited_by_babushka, #erb_path_for, #grep, #hostname, #insert_into_file, #log_and_open, #mysql, #rake, #render_erb, #yaml

Methods included from Prompt::Helpers

#confirm

Methods included from VersionOf::Helpers

VersionOf

Methods included from Vars::Helpers

#define_var, #merge, #print_var_deprecation_for, #set, #var

Methods included from AcceptsBlockFor

#block_for, #default_block_for, #default_blocks, #has_block?, included, #specific_block_for, #store_block_for

Methods included from AcceptsValueFor

included, #store_value_for, #value_for

Methods included from AcceptsListFor

included, #list_for, #store_list_for

Constructor Details

This class inherits a constructor from Babushka::DepDefiner

Class Method Details

.template(&block) ⇒ Object



4
5
6
7
# File 'lib/babushka/templated_dep_context.rb', line 4

def self.template &block
  @template = block unless block.nil?
  @template
end

Instance Method Details

#define!Object



9
10
11
12
# File 'lib/babushka/templated_dep_context.rb', line 9

def define!
  instance_eval(&self.class.template) unless self.class.template.nil?
  super
end