Class: Wptemplates::Link

Inherits:
Object
  • Object
show all
Includes:
Node
Defined in:
lib/wptemplates/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Node

#all_links, #all_templates, #all_templates_of, #deep_template_of, #template_of, #templates, #templates_of

Constructor Details

#initialize(text, link, anchor) ⇒ Link

Returns a new instance of Link.



81
82
83
84
85
# File 'lib/wptemplates/ast.rb', line 81

def initialize(text, link, anchor)
  @text = text
  @link = link
  @anchor = anchor
end

Instance Attribute Details

#anchorObject (readonly)

Returns the value of attribute anchor.



80
81
82
# File 'lib/wptemplates/ast.rb', line 80

def anchor
  @anchor
end

Returns the value of attribute link.



80
81
82
# File 'lib/wptemplates/ast.rb', line 80

def link
  @link
end

#textObject (readonly)

Returns the value of attribute text.



80
81
82
# File 'lib/wptemplates/ast.rb', line 80

def text
  @text
end

Instance Method Details



86
87
88
# File 'lib/wptemplates/ast.rb', line 86

def links
  [self]
end