Sha256: f2c12bc654bcd30a94a73b4f1f08e9275f7a0b55a2b2a119311015fd4ad9f807

Contents?: true

Size: 787 Bytes

Versions: 26

Compression:

Stored size: 787 Bytes

Contents

module Foobara
  class Error
    class << self
      def types_depended_on(*args)
        if args.size == 1
          context_type.types_depended_on(args.first)
        elsif args.empty?
          begin
            if context_type
              context_type.types_depended_on
            else
              raise Foobara::TypeDeclarations::ErrorExtension::NoContextTypeSetError
            end
          rescue Foobara::TypeDeclarations::ErrorExtension::NoContextTypeSetError
            if abstract?
              []
            else
              # :nocov:
              raise
              # :nocov:
            end
          end

        else
          # :nocov:
          raise ArgumentError, "Too many arguments #{args}"
          # :nocov:
        end
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
foobara-0.0.26 projects/types/src/extensions/error.rb
foobara-0.0.25 projects/types/src/extensions/error.rb
foobara-0.0.24 projects/types/src/extensions/error.rb
foobara-0.0.23 projects/types/src/extensions/error.rb
foobara-0.0.22 projects/types/src/extensions/error.rb
foobara-0.0.21 projects/types/src/extensions/error.rb
foobara-0.0.20 projects/types/src/extensions/error.rb
foobara-0.0.19 projects/types/src/extensions/error.rb
foobara-0.0.18 projects/types/src/extensions/error.rb
foobara-0.0.17 projects/types/src/extensions/error.rb
foobara-0.0.16 projects/types/src/extensions/error.rb
foobara-0.0.15 projects/types/src/extensions/error.rb
foobara-0.0.14 projects/types/src/extensions/error.rb
foobara-0.0.13 projects/types/src/extensions/error.rb
foobara-0.0.12 projects/types/src/extensions/error.rb
foobara-0.0.11 projects/types/src/extensions/error.rb
foobara-0.0.10 projects/types/src/extensions/error.rb
foobara-0.0.9 projects/types/src/extensions/error.rb
foobara-0.0.8 projects/types/src/extensions/error.rb
foobara-0.0.7 projects/types/src/extensions/error.rb