作者: admin 日期: 2006年05月11日  分类:Ruby  已有 3 条评论 
测试代码
  def bulk_mode     result = 0     case self.status     when ACTIVE       result |= (1 << ASSIGN_CMD)       result |= (1 << RESOLVE_CMD)     when RESOLVE_RANGE       result |= (1 << REACTIVATE_CMD)       result |= (1 << CLOSE_CMD)     when CLOSED       result |= (1 << REOPEN_CMD)     end     result   end
2204 days前 / 4,130 次浏览阅读全文