Method: Dao::Status#update
- Defined in:
- lib/dao/status.rb
#update(*args) ⇒ Object Also known as: set
260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/dao/status.rb', line 260 def update(*args) code, = if args.size == 2 [args.first, args.last] else status = Status.for(args.first || 200) [status.code, status.] end @code, @message = Integer(code), String() @group = (@code / 100) * 100 replace("#{ @code } #{ @message }".strip) end |