Sha256: eaa2a71e817c0dcf4207b428234005c9da6ea11c81532d42a67645caa1d7e7c4
Contents?: true
Size: 520 Bytes
Versions: 2
Compression:
Stored size: 520 Bytes
Contents
module Embedson class ClassTypeError < TypeError attr_reader :wrong_name, :correct_name def initialize(wrong_name, correct_name) @wrong_name, @correct_name = wrong_name, correct_name super(build_message) end def build_message "wrong argument type #{wrong_name} (expected #{correct_name})" end end class NoParentError < StandardError def initialize(action, klass_name) super("Cannot #{action} embedded #{klass_name} without a parent relation.") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
embedson-1.0.2 | lib/embedson/exceptions.rb |
embedson-1.0.1 | lib/embedson/exceptions.rb |