Sha256: fee74b7a845ef38a0b241b63c000babf73473ea912b750f706224804efaaed40

Contents?: true

Size: 296 Bytes

Versions: 10

Compression:

Stored size: 296 Bytes

Contents

module JsonApiClient
  module Helpers
    module Linkable
      extend ActiveSupport::Concern

      included do
        attr_accessor :links

        initializer do |obj, params|
          links = params.delete(:links)
          obj.links = links if links
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
json_api_client-0.3.1 lib/json_api_client/helpers/linkable.rb
json_api_client-0.3.0 lib/json_api_client/helpers/linkable.rb
json_api_client-0.2.4 lib/json_api_client/helpers/linkable.rb
json_api_client-0.2.3 lib/json_api_client/helpers/linkable.rb
json_api_client-0.2.2 lib/json_api_client/helpers/linkable.rb
json_api_client-0.2.1 lib/json_api_client/helpers/linkable.rb
json_api_client-0.2.0 lib/json_api_client/helpers/linkable.rb
json_api_client-0.1.3 lib/json_api_client/helpers/linkable.rb
json_api_client-0.1.2 lib/json_api_client/helpers/linkable.rb
json_api_client-0.1.1 lib/json_api_client/helpers/linkable.rb