Sha256: 7635189a1fce0dea797b1b8efef5671637f567ba261f2e7c982b8dd3dcce281b

Contents?: true

Size: 393 Bytes

Versions: 2

Compression:

Stored size: 393 Bytes

Contents

require 'explicit_delegator'

module WoopleTheme
  class VideoPresenter < ExplicitDelegator
    enforce_definitions :name, :desktop_src, :mobile_src, :streamer, :favorite?, :liked?

    def favorite_css_class
      favorite? ? 'active' : ''
    end

    def liked_css
      liked? == true ? 'active' : nil
    end

    def disliked_css
      liked? == false ? 'active' : nil
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
woople-theme-0.8.1 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.8.0 app/presenters/woople_theme/video_presenter.rb