Sha256: 6be7c72ca962f6aeedbc058c6265553266aee5e38d32e61e7c98635999588092

Contents?: true

Size: 1000 Bytes

Versions: 16

Compression:

Stored size: 1000 Bytes

Contents

module Eco
  module API
    module Common
      module People

        EAPI = Ecoportal::API
        LAST = EAPI::V1
        EXTERNAL = LAST
        INTERNAL = EAPI::Internal
        COMMON_API = EAPI::Common

        def is_internal_person?(object)
          object.is_a?(INTERNAL::Person)
        end

        def is_person?(object)
          object.is_a?(EXTERNAL::Person)
        end

        def is_internal?(object)
          object.is_a?(INTERNAL)
        end

        def is_external?(object)
          object.is_a?(EXTERNAL)
        end

        def is_api?(object)
          is_internal?(object) || is_external?(object)
        end

        def is_internal_people?(object)
          object.is_a?(INTERNAL::People)
        end

        def is_people?(object)
          object.is_a?(EXTERNAL::People)
        end

        def is_batch_operation(object)
          object.is_a?(COMMON_API::BatchOperation)
        end

      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
eco-helpers-0.6.17 lib/eco/api/common/people/types.rb
eco-helpers-0.6.16 lib/eco/api/common/people/types.rb
eco-helpers-0.6.15 lib/eco/api/common/people/types.rb
eco-helpers-0.6.13 lib/eco/api/common/people/types.rb
eco-helpers-0.6.12 lib/eco/api/common/people/types.rb
eco-helpers-0.6.11 lib/eco/api/common/people/types.rb
eco-helpers-0.6.9 lib/eco/api/common/people/types.rb
eco-helpers-0.6.8 lib/eco/api/common/people/types.rb
eco-helpers-0.6.7 lib/eco/api/common/people/types.rb
eco-helpers-0.6.6 lib/eco/api/common/people/types.rb
eco-helpers-0.6.5 lib/eco/api/common/people/types.rb
eco-helpers-0.6.4 lib/eco/api/common/people/types.rb
eco-helpers-0.6.3 lib/eco/api/common/people/types.rb
eco-helpers-0.6.2 lib/eco/api/common/people/types.rb
eco-helpers-0.6.1 lib/eco/api/common/people/types.rb
eco-helpers-0.6.0 lib/eco/api/common/people/types.rb