module Crystal class Params < OpenObject # include OpenConstructor def initialize h = nil if h and (format = h.delete('format') || h.delete(:format)) h = h.clone h[:format] = Format.new(format.to_s) end update h if h end def format= value self[:format] = Format.new value end def inspect h = to_h h.inspect end end end