Class: RubyIndexer::Entry::Member Abstract
- Inherits:
-
RubyIndexer::Entry
- Object
- RubyIndexer::Entry
- RubyIndexer::Entry::Member
- Defined in:
- lib/ruby_indexer/lib/ruby_indexer/entry.rb
Overview
This class is abstract.
Instance Attribute Summary collapse
-
#owner ⇒ Object
readonly
: Entry::Namespace?.
Attributes inherited from RubyIndexer::Entry
#location, #name, #uri, #visibility
Instance Method Summary collapse
-
#decorated_parameters ⇒ Object
: -> String.
-
#formatted_signatures ⇒ Object
: -> String.
-
#initialize(name, uri, location, comments, visibility, owner) ⇒ Member
constructor
: (String name, URI::Generic uri, Location location, String? comments, Symbol visibility, Entry::Namespace? owner) -> void.
-
#signatures ⇒ Object
abstract
: -> Array.
Methods inherited from RubyIndexer::Entry
#comments, #file_name, #file_path, #private?, #protected?, #public?
Constructor Details
#initialize(name, uri, location, comments, visibility, owner) ⇒ Member
: (String name, URI::Generic uri, Location location, String? comments, Symbol visibility, Entry::Namespace? owner) -> void
289 290 291 292 293 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 289 def initialize(name, uri, location, comments, visibility, owner) # rubocop:disable Metrics/ParameterLists super(name, uri, location, comments) @visibility = visibility @owner = owner end |
Instance Attribute Details
#owner ⇒ Object (readonly)
: Entry::Namespace?
286 287 288 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 286 def owner @owner end |
Instance Method Details
#decorated_parameters ⇒ Object
: -> String
302 303 304 305 306 307 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 302 def decorated_parameters first_signature = signatures.first return "()" unless first_signature "(#{first_signature.format})" end |
#formatted_signatures ⇒ Object
: -> String
310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 310 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 |
#signatures ⇒ Object
This method is abstract.
: -> Array
297 298 299 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 297 def signatures raise AbstractMethodInvokedError end |