Class: Autobuild::ImporterPackage

Inherits:
Package
  • Object
show all
Defined in:
lib/autobuild/packages/import.rb

Direct Known Subclasses

Ruby

Instance Attribute Summary collapse

Attributes inherited from Package

#dependencies, #env, #failures, #importdir, #importer, #logdir, #name, #prefix, #srcdir, #statistics, #update, #updated, #utilities

Instance Method Summary collapse

Methods inherited from Package

[], #add_env_op, #add_stat, #all_dependencies, #applied_post_install?, #apply_env, #apply_post_install, #checked_out?, clear, #depends_on, #depends_on?, #disable, #disable_doc, #disable_phases, #disabled?, #doc_dir, #doc_dir=, #doc_disabled, #doc_target_dir, #doc_target_dir=, #doc_task, each, #enable_doc, #env_add, #env_add_path, #env_add_prefix, #env_set, #env_source_after, #error, #failed?, #file, #find_in_path, #fingerprint, #full_env, #generates_doc?, #has_doc?, #import, #import=, #import_invoked?, #imported?, #in_dir, #inspect, #install, #install_doc, #install_invoked?, #installed?, #installstamp, #isolate_errors, #message, #method_missing, #parallel_build_level, #parallel_build_level=, #post_install, #prepare_for_forced_build, #prepare_for_rebuild, #process_formatting_string, #progress, #progress_done, #progress_start, #provides, #resolve_dependency_env, #resolved_env, #respond_to_missing?, #run, #self_fingerprint, #source_tree, #task, #to_s, #update?, #update_environment, #updated?, #utility, #warn, #working_directory

Constructor Details

#initialize(*args) ⇒ ImporterPackage

Returns a new instance of ImporterPackage.



12
13
14
15
# File 'lib/autobuild/packages/import.rb', line 12

def initialize(*args)
    @exclude = []
    super
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Autobuild::Package

Instance Attribute Details

#excludeObject (readonly)

Returns the value of attribute exclude.



10
11
12
# File 'lib/autobuild/packages/import.rb', line 10

def exclude
  @exclude
end

Instance Method Details

#prepareObject



17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/autobuild/packages/import.rb', line 17

def prepare
    super

    exclude = self.exclude.dup
    exclude << Regexp.new("^#{Regexp.quote(installstamp)}")
    exclude << Regexp.new("^#{Regexp.quote(doc_dir)}") if doc_dir

    source_tree(srcdir) do |pkg|
        pkg.exclude.concat exclude
        exclude.freeze
    end

    file installstamp => srcdir
end