Sha256: bde95cc88cfc9d0fa0bd0871f4b02bae38944ce5e9089c14eed7f010e5896627

Contents?: true

Size: 499 Bytes

Versions: 2

Compression:

Stored size: 499 Bytes

Contents

module ContentState
  class PresumedSpam < Base
    include Reloadable
    include Singleton

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

    def is_spam?(content)
      true
    end

    def mark_as_ham(content)
      content.state = Factory.new(:just_marked_as_ham)
    end

    def withdraw(content)
      content.mark_as_spam
    end

    def confirm_classification(content)
      content.mark_as_spam
    end

    def to_s
      "Spam?"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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