Sha256: c1c6449bd4ce1d89f01da55aa88143fd4caa9a0097064bab1e2e6732ce52832b

Contents?: true

Size: 435 Bytes

Versions: 2

Compression:

Stored size: 435 Bytes

Contents

module ContentState
  class Ham < Base
    include Reloadable
    include Singleton

    def enter_hook(content)
      super
      content[:published] = true
    end

    def published?(content)
      true
    end

    def before_save(content)
      content.report_as_ham
      true
    end

    def withdraw(content)
      content.mark_as_spam
    end

    def to_s
      'Ham'
    end

    def mark_as_ham(content)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typo-4.0.1 app/models/content_state/ham.rb
typo-4.0.2 app/models/content_state/ham.rb