Class: DatoDast::Nodes::ItemLink

Inherits:
Link
  • Object
show all
Defined in:
lib/dato_dast/nodes/item_link.rb

Constant Summary

Constants inherited from Link

Link::NEW_WINDOW_META

Constants inherited from Base

Base::EMPTY, Base::NEWLINE

Instance Method Summary collapse

Methods inherited from Link

#meta, #path

Methods inherited from Base

#children, #config, #css_class, #initialize, #meta, #node_config, #render, #render_children, #render_value, #tag, #tag_info, #type, type, #wrappers

Constructor Details

This class inherits a constructor from DatoDast::Nodes::Base

Instance Method Details

#itemObject



8
9
10
# File 'lib/dato_dast/nodes/item_link.rb', line 8

def item
  @links.find { |link| link[:id] == item_id }
end

#item_idObject



4
5
6
# File 'lib/dato_dast/nodes/item_link.rb', line 4

def item_id
  @node["item"]
end

#item_typeObject



16
17
18
# File 'lib/dato_dast/nodes/item_link.rb', line 16

def item_type
  item[:item_type]
end

#urlObject



12
13
14
# File 'lib/dato_dast/nodes/item_link.rb', line 12

def url
  item[url_key]
end