Class: Tc::Duration

Inherits:
Parslet::Parser
  • Object
show all
Defined in:
lib/tc/duration.rb

Instance Method Summary collapse

Instance Method Details

#stri(str) ⇒ Object



4
5
6
7
8
9
# File 'lib/tc/duration.rb', line 4

def stri(str)
  key_chars = str.split(//)
  key_chars.
    collect! { |char| match["#{char.upcase}#{char.downcase}"] }.
    reduce(:>>)
end