Sha256: c2323508ca8cbe2d73a6342b6f44e9c2fe023f23976d7dbce1bbeedc476cbd00

Contents?: true

Size: 270 Bytes

Versions: 1

Compression:

Stored size: 270 Bytes

Contents

require 'active_support/concern'

class Frenetic
  module CollectionRestMethods
    extend ActiveSupport::Concern

    def get( id )
      if response = api.get( member_url(id) ) and response.success?
        @resource_class.new response.body
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
frenetic-1.0.0.alpha.1 lib/frenetic/concerns/collection_rest_methods.rb