module PhcStringFormat::Formatter
Formatter
for stringifying and parsing PHC-string-format.
Public Class Methods
format(**kwargs)
click to toggle source
# File lib/phc_string_format/formatter.rb, line 6 def self.format(**kwargs) PhcString.create(**kwargs).to_s end
parse(string, hint: {}, pick: nil)
click to toggle source
# 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