Module: PhcStringFormat::Formatter
- Defined in:
- lib/phc_string_format/formatter.rb
Overview
Formatter for stringifying and parsing PHC-string-format.
Class Method Summary collapse
Class Method Details
.format(**kwargs) ⇒ Object
6 7 8 |
# File 'lib/phc_string_format/formatter.rb', line 6 def self.format(**kwargs) PhcString.create(**kwargs).to_s end |
.parse(string, hint: {}, pick: nil) ⇒ Object
10 11 12 |
# File 'lib/phc_string_format/formatter.rb', line 10 def self.parse(string, hint: {}, pick: nil) PhcString.parse(string).to_h(pick: pick, hint: hint) end |