Class: RubyIndexer::Entry::BlockParameter

Inherits:
Parameter
  • Object
show all
Defined in:
lib/ruby_indexer/lib/ruby_indexer/entry.rb

Overview

A block method parameter, e.g. ‘def foo(&block)`

Constant Summary collapse

DEFAULT_NAME =

: Symbol

:"<anonymous block>"

Instance Attribute Summary

Attributes inherited from Parameter

#name

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Parameter

#initialize

Constructor Details

This class inherits a constructor from RubyIndexer::Entry::Parameter

Class Method Details

.anonymousObject

: -> BlockParameter



262
263
264
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 262

def anonymous
  new(name: DEFAULT_NAME)
end

Instance Method Details

#decorated_nameObject

: -> Symbol



269
270
271
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 269

def decorated_name
  :"&#{@name}"
end