Class: Albacore::IlMergeResolver

Inherits:
Object
  • Object
show all
Includes:
Configuration::ILMerge
Defined in:
lib/albacore/ilmerge.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Configuration::ILMerge

#ilmerge, ilmergeconfig, #use_resolver

Methods included from Configuration

included

Constructor Details

#initialize(ilmerge_path = nil) ⇒ IlMergeResolver

Returns a new instance of IlMergeResolver.



45
46
47
# File 'lib/albacore/ilmerge.rb', line 45

def initialize ilmerge_path=nil
  @ilmerge_path = ilmerge_path || ilmerge.ilmerge_path
end

Instance Attribute Details

#ilmerge_pathObject

Returns the value of attribute ilmerge_path.



43
44
45
# File 'lib/albacore/ilmerge.rb', line 43

def ilmerge_path
  @ilmerge_path
end

Instance Method Details

#find_defaultObject



57
58
59
60
61
# File 'lib/albacore/ilmerge.rb', line 57

def find_default
  m = ['', ' (x86)'].map{|x| "C:\\Program Files#{x}\\Microsoft\\ILMerge\\ilmerge.exe" }.
    keep_if{|x| File.exists? x}.
    first
end

#path(path) ⇒ Object



49
50
51
# File 'lib/albacore/ilmerge.rb', line 49

def path path
  @ilmerge_path = path
end

#resolveObject



53
54
55
# File 'lib/albacore/ilmerge.rb', line 53

def resolve
  @ilmerge_path.nil? ? find_default : @ilmerge_path
end