Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/evil-winrm.rb
Overview
Class to create array (tokenize) from a string
Instance Method Summary collapse
Instance Method Details
#tokenize ⇒ Object
633 634 635 636 637 638 |
# File 'lib/evil-winrm.rb', line 633 def tokenize self. split(/\s(?=(?:[^'"]|'[^']*'|"[^"]*")*$)/). select {|s| not s.empty? }. map {|s| s.gsub(/(^ +)|( +$)|(^["']+)|(["']+$)/,'')} end |