Sha256: 6af2563d31168d456bb6655972d8d3cde6f96e92115f8f7f9374ae140daea731
Contents?: true
Size: 569 Bytes
Versions: 1
Compression:
Stored size: 569 Bytes
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), '../spec/spec_helper') class Post include ROXML xml_reader :href, :attr xml_reader :hash, :attr xml_reader :description, :attr xml_reader :tag, :attr xml_reader :time, :attr, :as => DateTime xml_reader :others, :attr, :as => Integer xml_reader :extended, :attr end class Posts include ROXML xml_reader :posts, [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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
Empact-roxml-2.4.2 | examples/posts.rb |