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 GitHelpers

git, git_update, update_and_log

Methods inherited from DepDefiner

#basename, #failed?, #get_source_location_for, #initialize, #invoke, #load_path, #loaded?, #metaclass, #name, #source_location, #source_location_for, #unmeetable!

Methods included from VersionOf::Helpers

VersionOf

Methods included from RunHelpers

#_by_babushka, #added_by_babushka, #babushka_config?, #edited_by_babushka, #erb_path_for, #render_erb

Methods included from PathHelpers

cd, in_build_dir, in_download_dir

Methods included from ShellHelpers

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

Methods included from LogHelpers

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

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

.metaclassObject


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

def self.metaclass
  class << self; self end
end

.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


13
14
15
16
# File 'lib/babushka/templated_dep_context.rb', line 13

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