Sha256: 30d90b4a294c690dc8b260a679ba0cd4f4543328a1ec1911c5f55d640ddbb86e

Contents?: true

Size: 367 Bytes

Versions: 27

Compression:

Stored size: 367 Bytes

Contents

require 'explicit_delegator'

module WoopleTheme
  class VideoPresenter < ExplicitDelegator
    enforce_definitions :src,   # path to the video
                        :liked? # does the user like this video (default: nil)

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

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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
woople-theme-0.5.2 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.0.1 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.0 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.4.2 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.4.1 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.4.0 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.3.9 app/presenters/woople_theme/video_presenter.rb