class C::TargetTag

Tag Target

This is the target used for tags.

Attributes

description[RW]
input[R]
output[R]
tag[R]

Public Class Methods

new(t) click to toggle source

Create a TargetTag

@param t [Symbol] the name of the tag.

# File lib/rub/c.rb, line 116
def initialize(t)
        t.is_a? Symbol or raise 'Targets can be created with symbols only.'

        @tag = t
        @output = Set[t]
        @input  = Set[]
end

Public Instance Methods

build() click to toggle source
# File lib/rub/c.rb, line 134
def build
        input.each{|i| R::get_target(i).build }
end
require(f) click to toggle source

Add a target to this tag.

@param f [Pathname,String] The path of the target.

# File lib/rub/c.rb, line 127
def require(f)
        f = R::Tool.make_set f
        f.map!{|e| C.path(e)}
        
        input.merge(f)
end