Class: RubyIndexer::Entry::Member
- Inherits:
-
RubyIndexer::Entry
- Object
- RubyIndexer::Entry
- RubyIndexer::Entry::Member
- Extended by:
- T::Helpers, T::Sig
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
Returns the value of attribute owner.
Attributes inherited from RubyIndexer::Entry
#comments, #file_path, #location, #name, #visibility
Instance Method Summary collapse
- #decorated_parameters ⇒ Object
- #formatted_signatures ⇒ Object
-
#initialize(name, file_path, location, comments, visibility, owner) ⇒ Member
constructor
rubocop:disable Metrics/ParameterLists.
- #parameters ⇒ Object
- #signatures ⇒ Object
Methods inherited from RubyIndexer::Entry
#file_name, #private?, #protected?, #public?
Constructor Details
#initialize(name, file_path, location, comments, visibility, owner) ⇒ Member
rubocop:disable Metrics/ParameterLists
329 330 331 332 333 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 329 def initialize(name, file_path, location, comments, visibility, owner) # rubocop:disable Metrics/ParameterLists super(name, file_path, location, comments) @visibility = visibility @owner = owner end |
Instance Attribute Details
#owner ⇒ Object (readonly)
Returns the value of attribute owner.
312 313 314 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 312 def owner @owner end |
Instance Method Details
#decorated_parameters ⇒ Object
339 340 341 342 343 344 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 339 def decorated_parameters first_signature = signatures.first return "()" unless first_signature "(#{first_signature.format})" end |
#formatted_signatures ⇒ Object
347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 347 def formatted_signatures overloads_count = signatures.size case overloads_count when 1 "" when 2 "\n(+1 overload)" else "\n(+#{overloads_count - 1} overloads)" end end |
#parameters ⇒ Object
315 316 317 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 315 def parameters T.must(signatures.first).parameters end |
#signatures ⇒ Object
336 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 336 def signatures; end |