Class: BuildMaster::Href
- Inherits:
-
Object
- Object
- BuildMaster::Href
- Defined in:
- lib/buildmaster/site/templatelets/href.rb
Instance Method Summary collapse
-
#initialize(site_spec) ⇒ Href
constructor
A new instance of Href.
- #process(target, template, source) ⇒ Object
Constructor Details
#initialize(site_spec) ⇒ Href
Returns a new instance of Href.
6 7 8 |
# File 'lib/buildmaster/site/templatelets/href.rb', line 6 def initialize(site_spec) @site_spec = site_spec end |
Instance Method Details
#process(target, template, source) ⇒ Object
10 11 12 13 14 |
# File 'lib/buildmaster/site/templatelets/href.rb', line 10 def process(target, template, source) url = template.attribute_value!('url') href = construct_href(url, source.path) target.attributes[name_based_on_target(target)] = href end |