Sha256: 445f12b2a060f4b2b929eb37eddcfdabd55ed3218ab394934dc02caf76c2c400

Contents?: true

Size: 1.04 KB

Versions: 10

Compression:

Stored size: 1.04 KB

Contents

module Writer
  module Fetcher
    module Microdata
      class ArticleSmall
        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]
              ],
              "articleBody" => [
                @attributes[:articleBody]
              ],
              "author" => [
                @attributes[:author].to.hash
              ],
              "Item#viewer" => [
                @attributes[:viewer].to.hash
              ],
              "dateCreated" => [
                @attributes[:dateCreated]
              ],
              "provider" => @attributes[:provider],
              "url" => [
                @attributes[:url]
              ]
            }
          }
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
fetcher-microdata-0.0.10 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.9 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.8 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.7 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.6 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.5 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.4 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.3 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.2 lib/writer/fetcher-microdata/article_small.rb
fetcher-microdata-0.0.1 lib/writer/fetcher-microdata/article_small.rb