Class: AliasLineParser::Zsh
- Inherits:
-
Object
- Object
- AliasLineParser::Zsh
- Defined in:
- lib/alias_metrics/alias_line_parser/zsh.rb
Instance Method Summary collapse
Instance Method Details
#parse(line) ⇒ Object
3 4 5 6 7 |
# File 'lib/alias_metrics/alias_line_parser/zsh.rb', line 3 def parse(line) key, value = line.split(/=/) value = remove_single_quotes(value) [key, value] end |
#remove_single_quotes(real) ⇒ Object
9 10 11 12 13 14 |
# File 'lib/alias_metrics/alias_line_parser/zsh.rb', line 9 def remove_single_quotes(real) if real[0, 1] == "'" and real[-1, 1] == "'" real = real[1..-2] end real end |