Class: ConvenientService::Utils::String::Split Private
- Inherits:
-
Support::Command
- Object
- Support::Command
- ConvenientService::Utils::String::Split
- Defined in:
- lib/convenient_service/utils/string/split.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #delimiters ⇒ Object readonly private
- #string ⇒ Object readonly private
Instance Method Summary collapse
- #call ⇒ String private
- #initialize(string, *delimiters) ⇒ void constructor private
Methods inherited from Support::Command
Constructor Details
#initialize(string, *delimiters) ⇒ void
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
29 30 31 32 |
# File 'lib/convenient_service/utils/string/split.rb', line 29 def initialize(string, *delimiters) @string = string.to_s @delimiters = delimiters end |
Instance Attribute Details
#delimiters ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 |
# File 'lib/convenient_service/utils/string/split.rb', line 22 def delimiters @delimiters end |
#string ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
16 17 18 |
# File 'lib/convenient_service/utils/string/split.rb', line 16 def string @string end |
Instance Method Details
#call ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 |
# File 'lib/convenient_service/utils/string/split.rb', line 40 def call string.split(::Regexp.union(delimiters)) end |