Sha256: 573dd86e9edf9c78a611a283ffadce6c764b80ad686285ed63d09097fc95f011
Contents?: true
Size: 916 Bytes
Versions: 1
Compression:
Stored size: 916 Bytes
Contents
module Markable class WrongMarkableType < Exception def initialize(markable_name) super "Wrong markable type: ['#{Markable.markables.join("', '")}'] expected, '#{markable_name}' provided." end end class NotAllowedMarker < Exception def initialize(marker, markable, mark) super "Marker '#{marker.class.name}' is not allowed to mark '#{markable.class.name}' with mark '#{mark}'. Allowed markers: '#{markable.markable_marks[mark][:allowed_markers].join("', '")}'" end end class WrongMarkerType < Exception def initialize(marker_name) super "Wrong marker type: ['#{Markable.markers.join("', '")}'] expected, '#{marker_name}' provided." end end class WrongMark < Exception def initialize(marker, markable, mark) super "Wrong mark '#{mark}' for '#{markable.class.name}'. Available marks: '#{markable.markable_marks.keys.join("', '")}'" end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
markable-0.0.5 | lib/markable/exceptions.rb |