Class: YARD::Parser::Ruby::ParameterNode

Inherits:
AstNode show all
Defined in:
lib/yard/parser/ruby/ast_node.rb

Constant Summary

Constants inherited from AstNode

AstNode::KEYWORDS

Instance Attribute Summary

Attributes inherited from AstNode

#docstring, #docstring_hash_flag, #docstring_range, #file, #full_source, #group, #line_range, #parent, #source, #source_range, #type

Printing a Node collapse

Methods inherited from AstNode

#call?, #children, #condition?, #first_line, #has_line?, #initialize, #inspect, #jump, #kw?, #line, #literal?, node_class_for, #pretty_print, #ref?, #show, #to_s, #token?, #traverse

Methods inherited from Array

#place

Constructor Details

This class inherits a constructor from YARD::Parser::Ruby::AstNode

Instance Method Details

#block_paramObject


348
# File 'lib/yard/parser/ruby/ast_node.rb', line 348

def block_param; self[4] ? self[4][0] : nil end

#optional_paramsObject


346
# File 'lib/yard/parser/ruby/ast_node.rb', line 346

def optional_params; self[1] end

#required_end_paramsObject


345
# File 'lib/yard/parser/ruby/ast_node.rb', line 345

def required_end_params; self[3] end

#required_paramsObject


344
# File 'lib/yard/parser/ruby/ast_node.rb', line 344

def required_params; self[0] end

#splat_paramObject


347
# File 'lib/yard/parser/ruby/ast_node.rb', line 347

def splat_param; self[2] ? self[2][0] : nil end