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.12.10 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.9 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.8 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.7 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.5 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.4 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.3 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.2 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.1 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.12.0 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.11 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.10 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.9 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.8 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.7 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.6 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.5 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.11.0 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.10.2 lib/jsonapionify/structure/helpers/inherits_origin.rb
jsonapionify-0.10.1 lib/jsonapionify/structure/helpers/inherits_origin.rb