Class: RtmTime::Ja
Instance Attribute Summary
Attributes included from RtmTime
Instance Method Summary collapse
-
#assort(num, unit) ⇒ Object
- param
-
String num [param] String unit.
Methods included from RtmTime
extended, iso8601, #parse, #to_a, #to_h
Instance Method Details
#assort(num, unit) ⇒ Object
- param
-
String num
- param
-
String unit
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rtm_time/estimate/ja.rb', line 10 def assort( num, unit ) super case unit when /\A日/u @day ||= num.to_i when /\A時/u @hour ||= num.to_f when /\A分/u @min ||= num.to_i end end |