测试代码
发表于:2006年05月11日  分类:Ruby  3 条评论  4,130 次浏览 
  1.   def bulk_mode
  2.     result = 0
  3.     case self.status
  4.     when ACTIVE
  5.       result |= (1 << ASSIGN_CMD)
  6.       result |= (1 << RESOLVE_CMD)
  7.     when RESOLVE_RANGE
  8.       result |= (1 << REACTIVATE_CMD)
  9.       result |= (1 << CLOSE_CMD)
  10.     when CLOSED
  11.       result |= (1 << REOPEN_CMD)
  12.     end
  13.     result
  14.   end
固定链接: http://liubin.nanshapo.com/2006/05/11/%e6%b5%8b%e8%af%95%e4%bb%a3%e7%a0%81/ | 其实我是一个程序员

测试代码:目前有3 条留言