class Crystal::Macros::Primitive
Overview
A fictitious node representing the body of a Def
marked with
@[Primitive]
.
Defined in:
compiler/crystal/macros.crInstance Method Summary
-
#name : SymbolLiteral
Returns the name of the primitive.
Instance Method Detail
def name : SymbolLiteral
#
Returns the name of the primitive.
This is identical to the argument to the associated @[Primitive]
annotation.
module Foo
@[Primitive(:abc)]
def foo
end
end
{{ Foo.methods.first.body.name }} # => :abc