Class: Build::Dependency::Alias

Inherits:
Struct
  • Object
show all
Defined in:
lib/build/dependency/provider.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#dependenciesObject

Returns the value of attribute dependencies

Returns:

  • (Object)

    the current value of dependencies


44
45
46
# File 'lib/build/dependency/provider.rb', line 44

def dependencies
  @dependencies
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name


44
45
46
# File 'lib/build/dependency/provider.rb', line 44

def name
  @name
end

#providerObject

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider


44
45
46
# File 'lib/build/dependency/provider.rb', line 44

def provider
  @provider
end

Instance Method Details

#alias?Boolean

Returns:

  • (Boolean)

53
54
55
# File 'lib/build/dependency/provider.rb', line 53

def alias?
	true
end

#each_dependency(&block) ⇒ Object


45
46
47
48
49
50
51
# File 'lib/build/dependency/provider.rb', line 45

def each_dependency(&block)
	return to_enum(&block) unless block_given?
	
	dependencies.each do |name|
		yield Depends.new(name)
	end
end

#to_sObject


57
58
59
# File 'lib/build/dependency/provider.rb', line 57

def to_s
	"provides #{name.inspect} -> #{dependencies.collect(&:inspect).join(', ')}"
end