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
#configuration, #location, #name, #uri, #visibility
Instance Method Summary collapse
-
#decorated_parameters ⇒ Object
: -> String.
-
#formatted_signatures ⇒ Object
: -> String.
-
#initialize(configuration, name, uri, location, comments, visibility, owner) ⇒ Member
constructor
: (Configuration configuration, 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(configuration, name, uri, location, comments, visibility, owner) ⇒ Member
: (Configuration configuration, String name, URI::Generic uri, Location location, String? comments, Symbol visibility, Entry::Namespace? owner) -> void
293 294 295 296 297 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 293 def initialize(configuration, name, uri, location, comments, visibility, owner) # rubocop:disable Metrics/ParameterLists super(configuration, name, uri, location, comments) @visibility = visibility @owner = owner end |
Instance Attribute Details
#owner ⇒ Object (readonly)
: Entry::Namespace?
290 291 292 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 290 def owner @owner end |
Instance Method Details
#decorated_parameters ⇒ Object
: -> String
306 307 308 309 310 311 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 306 def decorated_parameters first_signature = signatures.first return "()" unless first_signature "(#{first_signature.format})" end |
#formatted_signatures ⇒ Object
: -> String
314 315 316 317 318 319 320 321 322 323 324 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 314 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
301 302 303 |
# File 'lib/ruby_indexer/lib/ruby_indexer/entry.rb', line 301 def signatures raise AbstractMethodInvokedError end |