Class: Jei::LinkNode
Overview
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
-
#initialize(link) ⇒ LinkNode
constructor
A new instance of LinkNode.
- #visit(context) ⇒ Object
Constructor Details
#initialize(link) ⇒ LinkNode
Returns a new instance of LinkNode.
5 6 7 8 |
# File 'lib/jei/nodes/link_node.rb', line 5 def initialize(link) super() @link = link end |
Instance Method Details
#visit(context) ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/jei/nodes/link_node.rb', line 11 def visit(context) context[@link.name] = if @link..any? { href: @link.href, meta: @link. } else @link.href end end |