Class: Moult::Index::Definition
- Inherits:
-
Struct
- Object
- Struct
- Moult::Index::Definition
- Defined in:
- lib/moult/index.rb
Overview
A definition site that is a candidate for the dead-code analysis. All fields are Moult-owned; no rubydex object leaks past this struct.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#override_of ⇒ Object
readonly
FQ name of the ancestor whose method this overrides/implements (reachable via that interface), else nil.
-
#owner ⇒ Object
Returns the value of attribute owner.
-
#path ⇒ Object
Returns the value of attribute path.
-
#reference_count ⇒ Object
readonly
resolvable usages of this definition.
-
#reference_paths ⇒ Object
readonly
root-relative paths that use it.
-
#span ⇒ Object
Returns the value of attribute span.
-
#symbol_id ⇒ Object
Returns the value of attribute symbol_id.
-
#unqualified_name ⇒ Object
Returns the value of attribute unqualified_name.
Instance Method Summary collapse
-
#kind(value) ⇒ Object
:method or :constant.
-
#singleton(value) ⇒ Object
true for Class.method / constants.
-
#visibility(value) ⇒ Object
:public, :private, :protected.
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
33 34 35 |
# File 'lib/moult/index.rb', line 33 def name @name end |
#override_of ⇒ Object (readonly)
FQ name of the ancestor whose method this overrides/implements (reachable via that interface), else nil
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |
#owner ⇒ Object
Returns the value of attribute owner
33 34 35 |
# File 'lib/moult/index.rb', line 33 def owner @owner end |
#path ⇒ Object
Returns the value of attribute path
33 34 35 |
# File 'lib/moult/index.rb', line 33 def path @path end |
#reference_count ⇒ Object (readonly)
resolvable usages of this definition
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |
#reference_paths ⇒ Object (readonly)
root-relative paths that use it
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |
#span ⇒ Object
Returns the value of attribute span
33 34 35 |
# File 'lib/moult/index.rb', line 33 def span @span end |
#symbol_id ⇒ Object
Returns the value of attribute symbol_id
33 34 35 |
# File 'lib/moult/index.rb', line 33 def symbol_id @symbol_id end |
#unqualified_name ⇒ Object
Returns the value of attribute unqualified_name
33 34 35 |
# File 'lib/moult/index.rb', line 33 def unqualified_name @unqualified_name end |
Instance Method Details
#kind=(value) ⇒ Object
:method or :constant
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |
#singleton=(value) ⇒ Object
true for Class.method / constants
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |
#visibility=(value) ⇒ Object
:public, :private, :protected
33 34 35 36 37 |
# File 'lib/moult/index.rb', line 33 Definition = Struct.new( :symbol_id, :kind, :name, :unqualified_name, :owner, :visibility, :singleton, :span, :path, :reference_count, :reference_paths, :override_of ) |