ROXML is a module for binding Ruby classes to XML. It supports custom mapping and bidirectional marshalling between Ruby and XML using annotation-style class methods, via Nokogiri or LibXML.
From History.txt:
Default attrs ending in '_at' to DateTime. This can be overriden via :as
I have a ROXML class with a 'created_at' XML accessor. I do not want the value to be auto-parsed to a DateTime. So I tried to override this use the :as option (per the History.txt) two different ways. See below:
xml_accessor :created_at, :as => :text
xml_accessor :created_at, :as => String
In both cases, I get an:
ArgumentError: Invalid :as argument
Either this is a bug or my syntax is off. Any guidance?
From History.txt: Default attrs ending in '_at' to DateTime. This can be overriden via :as
I have a ROXML class with a 'created_at' XML accessor. I do not want the value to be auto-parsed to a DateTime. So I tried to override this use the :as option (per the History.txt) two different ways. See below: xml_accessor :created_at, :as => :text xml_accessor :created_at, :as => String
In both cases, I get an: ArgumentError: Invalid :as argument
Either this is a bug or my syntax is off. Any guidance?
Cheers.