Sha256: 0be04547e7676db9ac53b082eddabbfe1a6d4233ffe928c91a71be26f6644a62
Contents?: true
Size: 519 Bytes
Versions: 50
Compression:
Stored size: 519 Bytes
Contents
dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib')) require File.join(dir, 'happymapper') file_contents = File.read(dir + '/../spec/fixtures/posts.xml') class Post include HappyMapper attribute :href, String attribute :hash, String attribute :description, String attribute :tag, String attribute :time, DateTime attribute :others, Integer attribute :extended, String end posts = Post.parse(file_contents) posts.each { |post| puts post.description, post.href, post.extended, '' }
Version data entries
50 entries across 50 versions & 13 rubygems