Class: YARD::Parser::Ruby::ParameterNode
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
|
|
Instance Chain:
|
|
Inherits: |
YARD::Parser::Ruby::AstNode
|
Defined in: | lib/yard/parser/ruby/ast_node.rb |
Constant Summary
Managing node state
Class Method Summary
AstNode
- Inherited
.new | Creates a new AST node. |
.node_class_for | Finds the node subclass that should be instantiated for a specific node type. |
Instance Attribute Summary
AstNode
- Inherited
#block?, #call?, | |
#comments | Alias for AstNode#docstring. |
#comments_hash_flag | Alias for AstNode#docstring_hash_flag. |
#comments_range | Alias for AstNode#docstring_range. |
#condition?, #def?, #docstring, #docstring_hash_flag, #docstring_range, #file, #file=, #full_source, #full_source=, #group, #has_line?, #kw?, #line_range, #line_range=, #literal?, #loop?, #parent, #ref?, #source, #source=, #source_range, #source_range=, | |
#to_s | Alias for AstNode#source. |
#token?, #type |
Instance Method Summary
AstNode
- Inherited
#==, #children, #first_line, #inspect, | |
#jump | Searches through the node and all descendants and returns the first node with a type matching any of |
#line, #pretty_print, #show, | |
#traverse | Traverses the object and yields each node (including descendants) in order. |
#unfreeze | Resets node state in tree. |
#reset_line_info | Resets line information. |
::Array
- Inherited
#place | Places values before or after another object (by value) in an array. |
Constructor Details
This class inherits a constructor from YARD::Parser::Ruby::AstNode
Instance Method Details
#args_forward
[ GitHub ]#block_param
[ GitHub ]# File 'lib/yard/parser/ruby/ast_node.rb', line 426
def block_param self[-1] ? self[-1][0] : nil end
#double_splat_param
[ GitHub ]#named_params
[ GitHub ]#splat_param
[ GitHub ]# File 'lib/yard/parser/ruby/ast_node.rb', line 406
def splat_param self[2] ? self[2][0] : nil end
#unnamed_end_params
[ GitHub ]# File 'lib/yard/parser/ruby/ast_node.rb', line 410
def unnamed_end_params self[3] end
#unnamed_optional_params
[ GitHub ]# File 'lib/yard/parser/ruby/ast_node.rb', line 385
def unnamed_optional_params return @unnamed_optional_params if defined?(@unnamed_optional_params) params = self[1] || [] if self[-3] && self[-3][0] && self[-3][0].type == :unnamed_optional_arg params += self[-3] end @unnamed_optional_params = params.empty? ? nil : params end
#unnamed_required_params
[ GitHub ]# File 'lib/yard/parser/ruby/ast_node.rb', line 381
def unnamed_required_params self[0] end