On this page
Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
class · Ruby 3.4
Prism::DefNode
Represents a method definition.
def method end ^^^^^^^^^^
Class methods 2
Instance methods 30
#===
#accept
#child_nodes
#comment_targets
#compact_child_nodes
#copy
#deconstruct
#deconstruct_keys
#def_keyword
#def_keyword_loc
#end_keyword
#end_keyword_loc
#equal
#equal_loc
#inspect
#lparen
#lparen_loc
#name_loc
#operator
#operator_loc
#rparen
#rparen_loc
#save_def_keyword_loc
#save_end_keyword_loc
#save_equal_loc
#save_lparen_loc
#save_name_loc
#save_operator_loc
#save_rparen_loc
#type
Attributes
Read
attr_reader body: StatementsNode | BeginNode | nil
Read
attr_reader parameters: ParametersNode?
Read
attr_reader receiver: Prism::node?