Class: Halftime::InternalParser

Inherits:
Parslet::Parser
  • Object
show all
Defined in:
lib/halftime/internal_parser.rb

Instance Method Summary collapse

Instance Method Details

#stri(string) ⇒ Object



200
201
202
203
204
205
# File 'lib/halftime/internal_parser.rb', line 200

def stri(string)
  string.
    split(//).
    map! { |char| match("[#{char.upcase}#{char.downcase}]") }.
    reduce(:>>)
end