Class: Usher::Splitter::MultiCharacterSplitterInstance
- Inherits:
-
Object
- Object
- Usher::Splitter::MultiCharacterSplitterInstance
- Defined in:
- lib/usher/splitter.rb
Instance Method Summary collapse
-
#initialize(delimiters) ⇒ MultiCharacterSplitterInstance
constructor
A new instance of MultiCharacterSplitterInstance.
- #split(path) ⇒ Object
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 |