Class: Tramway::Landing::BlockTypes::FeaturesDecorator

Inherits:
Core::ApplicationDecorator
  • Object
show all
Defined in:
app/decorators/tramway/landing/block_types/features_decorator.rb

Instance Method Summary collapse

Instance Method Details



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

#anchorObject



12
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 12

def anchor; end


16
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 16

def external_link; end

#full_textObject



14
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 14

def full_text; end

#iconObject



4
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 4

def icon; end

#imageObject



6
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 6

def image; end

#textObject



10
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 10

def text; end

#titleObject



8
# File 'app/decorators/tramway/landing/block_types/features_decorator.rb', line 8

def title; end