1. 5
  1.  

  2. 6

    Wrapping it all in a class when it is ultimately called as a module is kind of silly, as is using send().

    It’s funny because I wouldn’t say anything if the author had made it a PORO with no state.

    1. [Comment removed by author]

      1. 1

        Agreed! It makes a lot more sense to parse the JSON into some internal structure, then serialize that as XML. And for this particular example, you only need from_json and to_xml.

      2. 1

        Not quite what I was expecting. I guess I interpreted the name of this to indicate “using pure functions as an object” a la let-over-lambda (http://letoverlambda.com/textmode.cl/guest/chap2.html), but I guess this really just meant using internal/private methods with a public method as the external interface?