Class: Attributor::Flatpack::MultilineString
- Inherits:
-
String
- Object
- String
- Attributor::Flatpack::MultilineString
- Defined in:
- lib/attributor/flatpack/types/multiline_string.rb
Class Method Summary collapse
Class Method Details
.example ⇒ Object
15 16 17 |
# File 'lib/attributor/flatpack/types/multiline_string.rb', line 15 def self.example(*) '-----BEGIN EC PRIVATE KEY-----\\nMIHcAgEBBEI\\n3abcdefghijklmnop==\\n-----END EC PRIVATE KEY-----' end |
.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **options) ⇒ Object
9 10 11 12 13 |
# File 'lib/attributor/flatpack/types/multiline_string.rb', line 9 def self.load(value, context = Attributor::DEFAULT_ROOT_CONTEXT, **) value.gsub('\\n', "\n") rescue StandardError super end |