Sha256: f941e568e1b8f1d96a18b981e1a4ad6cd86a67093a3404e1dbd7c5916496bc2f

Contents?: true

Size: 599 Bytes

Versions: 2

Compression:

Stored size: 599 Bytes

Contents

module Restfulie
  module Common
    module Converter
      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
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
restfulie-1.0.0.beta1 lib/restfulie/common/converter/xml/link.rb
restfulie-0.1.0.beta1 lib/restfulie/common/converter/xml/link.rb