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.6.4 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.6.3 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.6.2 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.6.1 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.6 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.17 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.16 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.15 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.14 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.13 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.12 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.11 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.10 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.9 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.8 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.7 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.6 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.5 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.4 app/presenters/woople_theme/video_presenter.rb
woople-theme-0.5.3 app/presenters/woople_theme/video_presenter.rb