Exception: SmartParams::MissingTypeAnnotationException

Inherits:
StandardError
  • Object
show all
Defined in:
lib/smart_params/missing_type_annotation_exception.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path:) ⇒ MissingTypeAnnotationException

Returns a new instance of MissingTypeAnnotationException.



7
8
9
10
# File 'lib/smart_params/missing_type_annotation_exception.rb', line 7

def initialize(path:)
  @path = path
  super(message)
end

Instance Attribute Details

#pathObject

Returns the value of attribute path.



5
6
7
# File 'lib/smart_params/missing_type_annotation_exception.rb', line 5

def path
  @path
end

Instance Method Details

#messageObject



12
13
14
# File 'lib/smart_params/missing_type_annotation_exception.rb', line 12

def message
  "/#{@path.join('/')}  was expected to define a type or a block, but did neither"
end