Class: Dato::Link
- Defined in:
- app/components/dato/link.rb
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #generated_tag ⇒ Object
-
#initialize(node, root) ⇒ Link
constructor
A new instance of Link.
- #link_attributes ⇒ Object
Methods inherited from Node
#blocks, #debug_node, #overrides, #render_node
Constructor Details
Instance Method Details
#generated_tag ⇒ Object
8 9 10 |
# File 'app/components/dato/link.rb', line 8 def generated_tag "a" end |
#link_attributes ⇒ Object
12 13 14 15 16 17 18 19 |
# File 'app/components/dato/link.rb', line 12 def link_attributes attr = { "href" => @node.url, "class" => "dato-cms-#{@node.type}", } %w[rel target].each { |type| attr[type] = (type) } attr end |