W3cubDocs

/Crystal 0.31

annotation Deprecated

Overview

This annotations marks methods, classes, constants, and macros as deprecated.

It receives an optional StringLiteral as single argument containing a deprecation notice.

@[Deprecated("Use `#bar` instead")]
def foo
end

Defined in:

annotations.cr

© 2012–2019 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.31.1/Deprecated.html