⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 unclassified.rb

📁 用ruby on rails写的一个博客程序,还不错..ruby on rails的确是个好框架
💻 RB
字号:
module ContentState  class Unclassified < Base    include Singleton    def enter_hook(content)      super      content[:published] = false      content[:status_confirmed] = false    end    def published?(content)      classify(content).published?(content)    end    def is_spam?(content)      classify(content).is_spam?(content)    end    def classify(content)      content.state = case content.classify                      when :ham                        Factory.new(:just_presumed_ham)                      when :spam                        Factory.new(:presumed_spam)                      else                        Factory.new(:presumed_spam)                      end    end    def before_save(feedback)      classify(feedback)    end    def to_s      "Unclassified"    end  endend

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -