Class: Locomotive::Steam::Liquid::Drops::SectionUrlField
- Inherits:
-
Liquid::Drop
- Object
- Liquid::Drop
- Locomotive::Steam::Liquid::Drops::SectionUrlField
- Defined in:
- lib/locomotive/steam/liquid/drops/section_content_proxy.rb
Overview
Drop representing the value of an url attribute
Instance Method Summary collapse
-
#initialize(url, new_window = false) ⇒ SectionUrlField
constructor
A new instance of SectionUrlField.
- #new_window ⇒ Object
- #new_window_attribute ⇒ Object
- #present? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(url, new_window = false) ⇒ SectionUrlField
Returns a new instance of SectionUrlField.
87 88 89 |
# File 'lib/locomotive/steam/liquid/drops/section_content_proxy.rb', line 87 def initialize(url, new_window = false) @url, @new_window = url, new_window end |
Instance Method Details
#new_window ⇒ Object
91 92 93 |
# File 'lib/locomotive/steam/liquid/drops/section_content_proxy.rb', line 91 def new_window @new_window end |
#new_window_attribute ⇒ Object
95 96 97 |
# File 'lib/locomotive/steam/liquid/drops/section_content_proxy.rb', line 95 def new_window_attribute !!@new_window ? 'target="_blank"' : '' end |
#present? ⇒ Boolean
99 100 101 |
# File 'lib/locomotive/steam/liquid/drops/section_content_proxy.rb', line 99 def present? @url.present? end |
#to_s ⇒ Object
103 104 105 |
# File 'lib/locomotive/steam/liquid/drops/section_content_proxy.rb', line 103 def to_s @url end |