Exception: Dcmgr::Models::Tag::UnacceptableTagType
- Inherits:
-
StandardError
- Object
- StandardError
- Dcmgr::Models::Tag::UnacceptableTagType
- Defined in:
- lib/dcmgr/models/tag.rb
Instance Method Summary collapse
-
#initialize(msg, tag, taggable) ⇒ UnacceptableTagType
constructor
A new instance of UnacceptableTagType.
Constructor Details
#initialize(msg, tag, taggable) ⇒ UnacceptableTagType
Returns a new instance of UnacceptableTagType.
64 65 66 67 68 69 70 71 |
# File 'lib/dcmgr/models/tag.rb', line 64 def initialize(msg, tag, taggable) super(msg) raise ArgumentError, "Expected child of #{Tag} but #{tag.class}" unless tag.is_a?(Tag) raise ArgumentError, "Expected kind of #{Taggable} but #{taggable.class}" unless taggable.kind_of?(Taggable) @tag = tag @taggable = taggable end |