Changeset 9710
- Timestamp:
- 04/18/08 19:52:57 (5 years ago)
- Files:
-
- 1 modified
-
lang/ruby/snarl/timer/timer.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/ruby/snarl/timer/timer.rb
r9706 r9710 14 14 15 15 class Timer 16 attr_reader :sec 17 16 18 def initialize(sec, options = {}) 17 19 @sec = sec 18 20 @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] || 1021 @title = options[:title].toutf8 || "Timer" 22 @body = options[:body].tout8.to_a || [] 23 @icon = options[:icon] || 'img/test.png' 24 @timeout = options[:timeout] || 10 23 25 wait 24 26 notice … … 51 53 opt = OptionParser.new 52 54 opt.on('-s') {|v| sec = sec; disp_start_message(sec, "sec")} 53 opt.on('-m') {|v| min = sec; sec *= 60; disp_start_message(min, "min") }55 opt.on('-m') {|v| min = sec; sec *= 60; disp_start_message(min, "min")} 54 56 55 57 opt.parse!(ARGV)
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)