Class: Prismic::Fragments::ImageLink
- Defined in:
- lib/prismic/fragments/link.rb
Instance Attribute Summary collapse
-
#target ⇒ Object
Returns the value of attribute target.
-
#url(link_resolver = nil) ⇒ Object
Returns the URL of the link.
Instance Method Summary collapse
-
#initialize(url, target = nil) ⇒ ImageLink
constructor
A new instance of ImageLink.
Methods inherited from Link
#as_html, #end_html, #start_html
Methods inherited from Fragment
Constructor Details
#initialize(url, target = nil) ⇒ ImageLink
Returns a new instance of ImageLink.
90 91 92 93 |
# File 'lib/prismic/fragments/link.rb', line 90 def initialize(url, target = nil) @url = url @target = target end |
Instance Attribute Details
#target ⇒ Object
Returns the value of attribute target.
88 89 90 |
# File 'lib/prismic/fragments/link.rb', line 88 def target @target end |
#url(link_resolver = nil) ⇒ Object
Note:
The link_resolver parameter is accepted but it is not used by this method, so not providing it is perfectly fine.
Returns the URL of the link
103 104 105 |
# File 'lib/prismic/fragments/link.rb', line 103 def url @url end |