Sha256: fcb39baa4c9a79b37814f24d74e917c96a48cf96cb5536e11144e528c21292ea
Contents?: true
Size: 639 Bytes
Versions: 11
Compression:
Stored size: 639 Bytes
Contents
#!/usr/bin/env ruby require File.expand_path(File.dirname(__FILE__) + '/../spec/spec_helper') class Post include ROXML xml_reader :href, :from => :attr xml_reader :hash, :from => :attr xml_reader :description, :from => :attr xml_reader :tag, :from => :attr xml_reader :created_at, :from => '@time' xml_reader :others, :from => :attr, :as => Integer xml_reader :extended, :from => :attr end class Posts include ROXML xml_reader :posts, :as => [Post] end unless defined?(Spec) posts = Posts.from_xml(xml_for('posts')) posts.posts.each do |post| puts post.description, post.href, post.extended, '' end end
Version data entries
11 entries across 11 versions & 5 rubygems