Changeset 9710

Show
Ignore:
Timestamp:
04/18/08 19:52:57 (5 years ago)
Author:
gan2
Message:

lang/ruby/snarl/timer/timer.rb Timer.new の引数の文字列を toutf8 するようにした

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/snarl/timer/timer.rb

    r9706 r9710  
    1414 
    1515class Timer 
     16  attr_reader :sec 
     17   
    1618  def initialize(sec, options = {}) 
    1719    @sec        = sec 
    1820    @start_time = Time.now 
    19     @title   = options[:title]     || "Timer" 
    20     @body    = options[:body].to_a || [] 
    21     @icon    = options[:icon]      || 'img/test.png' 
    22     @timeout = options[:timeout]   || 10 
     21    @title   = options[:title].toutf8    || "Timer" 
     22    @body    = options[:body].tout8.to_a || [] 
     23    @icon    = options[:icon]            || 'img/test.png' 
     24    @timeout = options[:timeout]         || 10 
    2325    wait 
    2426    notice 
     
    5153opt = OptionParser.new 
    5254opt.on('-s') {|v| sec = sec; disp_start_message(sec, "sec")} 
    53 opt.on('-m') {|v| min = sec; sec *= 60; disp_start_message(min, "min") } 
     55opt.on('-m') {|v| min = sec; sec *= 60; disp_start_message(min, "min")} 
    5456 
    5557opt.parse!(ARGV)