Class: C::Tag

Inherits:
Object show all
Defined in:
lib/rub/c.rb

Overview

Tag class

Manages a tag. This should not be created buy the user but retrieved from tag.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(t) ⇒ Tag

Create a Tag

Parameters:

  • t (Symbol)

    the name of the tag.



158
159
160
161
162
# File 'lib/rub/c.rb', line 158

def initialize(t)
	@name = t
	@target = TargetTag.new(t)
	@target.register
end

Instance Attribute Details

#nameSymbol

The tag’s name.

Returns:

  • (Symbol)


146
147
148
# File 'lib/rub/c.rb', line 146

def name
  @name
end

Instance Method Details

#descriptionObject



148
149
150
# File 'lib/rub/c.rb', line 148

def description
	@target.description
end

#description=(d) ⇒ Object



151
152
153
# File 'lib/rub/c.rb', line 151

def description=(d)
	@target.description = d
end

#require(f) ⇒ Object

Add a target to this tag.

Parameters:

  • f (Pathname, String)

    The path of the target.



167
168
169
# File 'lib/rub/c.rb', line 167

def require(f)
	@target.require f
end