Sha256: d51df90419c972dd1a29e78125914aee9c417dfea5e81897c716fc41362f6e0a

Contents?: true

Size: 521 Bytes

Versions: 1

Compression:

Stored size: 521 Bytes

Contents

module Tokamak
  module Xml
    class Link
      def initialize(options = {})
        @options = options
      end
      def href
        @options["href"]
      end
      def rel
        @options["rel"]
      end
      def content_type
        @options["type"]
      end
      def type
        content_type
      end
      def follow
        r = Restfulie.at(href)
        r = r.as(content_type) if content_type
        r
      end
      
      def to_s
        "<link to #{@options}>"
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tokamak-1.0.0.beta2 lib/tokamak/xml/link.rb