Sha256: 21102f83f7453ac7d8562f9a9f297b2de9d71de195d6b7cf20e39cd8ff0ed4a0

Contents?: true

Size: 463 Bytes

Versions: 2

Compression:

Stored size: 463 Bytes

Contents

module Konstructor

  class ReservedNameError < StandardError
    def initialize(name)
      super "Custom constructor can't have name '#{name}', "
            "it is reserved for default constructor."
    end
  end

  class IncludeInModuleError < StandardError
    def initialize(base)
      super "Konstructor can't be included in module '#{base.name}' directly, " +
            "please, use ActiveSupport::Concern or included hook directly."
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
konstructor-0.2.0 lib/konstructor/exceptions.rb
konstructor-0.1.0 lib/konstructor/exceptions.rb