Class: Tramway::Landing::BlockTypes::FeaturesDecorator
- Inherits:
-
Core::ApplicationDecorator
- Object
- Core::ApplicationDecorator
- Tramway::Landing::BlockTypes::FeaturesDecorator
- Defined in:
- app/decorators/tramway/landing/block_types/features_decorator.rb
Instance Method Summary collapse
- #active_link ⇒ Object
- #anchor ⇒ Object
- #external_link ⇒ Object
- #full_text ⇒ Object
- #icon ⇒ Object
- #image ⇒ Object
- #text ⇒ Object
- #title ⇒ Object
Instance Method Details
#active_link ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 18 def active_link if anchor.present? "##{anchor}" else if external_link.present? if external_link.match?(%r{^https?://}) external_link else "http://#{external_link}" end else '' end end end |
#anchor ⇒ Object
12 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 12 def anchor; end |
#external_link ⇒ Object
16 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 16 def external_link; end |
#full_text ⇒ Object
14 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 14 def full_text; end |
#icon ⇒ Object
4 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 4 def icon; end |
#image ⇒ Object
6 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 6 def image; end |
#text ⇒ Object
10 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 10 def text; end |
#title ⇒ Object
8 |
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 8 def title; end |