Exception: Tag::UnacceptableTagType
- Inherits:
-
StandardError
- Object
- StandardError
- Tag::UnacceptableTagType
- Defined in:
- app/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.
32 33 34 35 36 37 38 39 |
# File 'app/models/tag.rb', line 32 def initialize(msg, tag, taggable) super(msg) raise ArgumentError, "Expected #{Tag.class}: #{tag.class}" unless tag.is_a?(Tag) raise ArgumentError, "Expected #{Taggable.class}: #{tag.class}" unless taggable.is_a?(Taggable) @tag = tag @taggable = taggable end |