Class: ParameterSubstitution::Formatters::SplitBeforeColon
- Inherits:
-
Base
- Object
- Base
- ParameterSubstitution::Formatters::SplitBeforeColon
show all
- Defined in:
- lib/parameter_substitution/formatters/split_before_colon.rb
Class Method Summary
collapse
Methods inherited from Base
encoding, has_parameters?, key, parse_duration
Class Method Details
.description ⇒ Object
4
5
6
|
# File 'lib/parameter_substitution/formatters/split_before_colon.rb', line 4
def self.description
"Returns the portion of a string before the first colon, or the full string if there is no colon."
end
|
8
9
10
|
# File 'lib/parameter_substitution/formatters/split_before_colon.rb', line 8
def self.format(value)
value && value.to_s.split(':')[0]
end
|