Sha256: 02998d5743f8e5e795ae6cd94feb2076201f4e57cde65a3a63289fabbfd3430d

Contents?: true

Size: 267 Bytes

Versions: 3

Compression:

Stored size: 267 Bytes

Contents

class RestModel
  class Href
    module Response
      def to_resource(parent)
        id_key = parent.class.id_key.name
        {name => URI.escape("#{RestModel::Configuration.host}/#{parent.class.resource_name}/#{parent.send(id_key)}")}
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rest_model-0.3.1 lib/rest_model/key/href/response.rb
rest_model-0.3.0 lib/rest_model/key/href/response.rb
rest_model-0.2.3 lib/rest_model/key/href/response.rb