Class: DatoDast::Nodes::ItemLink
- Inherits:
-
Link
- Object
- Base
- Link
- DatoDast::Nodes::ItemLink
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
Instance Method Details
#item ⇒ Object
8
9
10
|
# File 'lib/dato_dast/nodes/item_link.rb', line 8
def item
@links.find { |link| link[:id] == item_id }
end
|
#item_id ⇒ Object
4
5
6
|
# File 'lib/dato_dast/nodes/item_link.rb', line 4
def item_id
@node["item"]
end
|
#item_type ⇒ Object
16
17
18
|
# File 'lib/dato_dast/nodes/item_link.rb', line 16
def item_type
item[:item_type]
end
|
#url ⇒ Object
12
13
14
|
# File 'lib/dato_dast/nodes/item_link.rb', line 12
def url
item[url_key]
end
|