Sha256: 08d168add8821bf760ed09deb7c60b4c6c2a577b03ab0ddd8126e59ae58801b8

Contents?: true

Size: 408 Bytes

Versions: 48

Compression:

Stored size: 408 Bytes

Contents

# frozen_string_literal: true

class ::Tramway::Event::SectionFeatureDecorator < ::Tramway::Landing::BlockTypes::FeaturesDecorator
  delegate :icon, to: :object
  delegate :title, to: :object
  delegate :description, to: :object

  def text
    object.description.scan(%r{<strong>.*?</strong>}).join(' ')
  end

  def image
    object.photo.small.url
  end

  def anchor
    "section-#{object.id}"
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
tramway-event-1.9.20 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.8 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.7 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.6 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.5 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.4 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.3 app/decorators/tramway/event/section_feature_decorator.rb
tramway-event-1.9.19.2 app/decorators/tramway/event/section_feature_decorator.rb