module Writer module Fetcher module Microdata class Review attr_accessor :source def initialize the_source self.source = the_source end def hash @attributes = @source.attributes { "type" => [@source._type], "properties" => { "additionalType" => [ @attributes[:additionalType] ], "Item#id" => [ @attributes[:id] ], "reviewBody" => [ @attributes[:reviewBody] ], "author" => [ @attributes[:author].to.hash ], "Item#viewer" => [ @attributes[:viewer].to.hash ], "dateCreated" => [ @attributes[:dateCreated] ], "provider" => @attributes[:provider], "url" => [ @attributes[:url] ], "itemReviewed" => [ @attributes[:itemReviewed].to.hash ] } } end end end end end