Class: CodelessCode::Markup::Nodes::Link

Inherits:
Node
  • Object
show all
Defined in:
lib/codeless_code/markup/nodes.rb

Overview

A hyperlink. Either <a href=“”></a>, [[label]], or [[url|label]]

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#children, #to_s

Constructor Details

#initialize(href = nil, children = []) ⇒ Link

Returns a new instance of Link.



57
58
59
60
# File 'lib/codeless_code/markup/nodes.rb', line 57

def initialize(href = nil, children = [])
  super(children)
  @href = href
end

Instance Attribute Details

#hrefObject (readonly)

Returns the value of attribute href.



55
56
57
# File 'lib/codeless_code/markup/nodes.rb', line 55

def href
  @href
end