Class: Usher::Splitter::MultiCharacterSplitterInstance

Inherits:
Object
  • Object
show all
Defined in:
lib/usher/splitter.rb

Instance Method Summary collapse

Constructor Details

#initialize(delimiters) ⇒ MultiCharacterSplitterInstance

Returns a new instance of MultiCharacterSplitterInstance.



24
25
26
# File 'lib/usher/splitter.rb', line 24

def initialize(delimiters)
  @delimiters = delimiters
end

Instance Method Details

#split(path) ⇒ Object



28
29
30
31
32
# File 'lib/usher/splitter.rb', line 28

def split(path)
  split_path = path.split(delimiters_regexp)
  split_path.reject!{|s| s.empty? }
  split_path
end