Module: RubyTCC::Helper
- Defined in:
- lib/rubytcc/helper.rb
Class Method Summary collapse
Class Method Details
.camelize(underscored_word) ⇒ Object
9 10 11 |
# File 'lib/rubytcc/helper.rb', line 9 def camelize underscored_word underscored_word.to_s.gsub(/(?:^|_)(.)/) { $1.upcase } end |
.to_period(time) ⇒ Object
4 5 6 7 |
# File 'lib/rubytcc/helper.rb', line 4 def to_period(time) time = Time.parse(time).to_i (time - Time.parse("00:00").to_i) / (15 * 60) end |