A new instance of Image.
Returns a new instance of Image.
3 4 5 6 7 8
# File 'lib/cat_api/image.rb', line 3 def initialize(xml) xml.elements.map do |attribute| instance_variable_set "@#{attribute.node_name}", attribute.text CatAPI::Image.class_eval { attr_reader attribute.node_name.to_sym } end end