Sha256: b983a896adccb3568118195260fcaab238eccd207be397c505dddc04a7965462

Contents?: true

Size: 262 Bytes

Versions: 26

Compression:

Stored size: 262 Bytes

Contents

module JSONAPIonify::Structure
  module Helpers
    module InheritsOrigin
      def client?
        origin == :client
      end

      def server?
        origin == :server
      end

      def origin
        self.parent.try(:origin)
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
jsonapionify-0.10.0 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.9.3 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.9.2 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.9.1 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.9.0 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.0.1.pre lib/jsonapionify/structure/helpers/inherits_origin.rb