Exception: Emendate::ForbiddenSegmentAdditionError

Inherits:
StandardError
  • Object
show all
Includes:
Module.new
Defined in:
lib/emendate/errors.rb

Instance Method Summary collapse

Constructor Details

#initialize(token, meth, klass) ⇒ ForbiddenSegmentAdditionError

Returns a new instance of ForbiddenSegmentAdditionError.



34
35
36
37
38
39
# File 'lib/emendate/errors.rb', line 34

def initialize(token, meth, klass)
  type = token.type
  verb = meth.to_s.split("_").first
  m = "Cannot #{verb} :#{type} segment to #{klass} sources"
  super(m)
end