Class: Ryac::ConstantInfo
- Inherits:
-
Struct
- Object
- Struct
- Ryac::ConstantInfo
- Defined in:
- lib/ryac/analysis/constant/rename_mapping.rb,
sig/ryac/analysis/constant/rename_mapping.rbs
Overview
Represents a user-defined constant found in the source file
Instance Attribute Summary collapse
-
#definition_type ⇒ Object
Returns the value of attribute definition_type.
-
#full_path ⇒ Object
Returns the value of attribute full_path.
-
#original_name ⇒ Object
Returns the value of attribute original_name.
-
#scope_path ⇒ Object
Returns the value of attribute scope_path.
-
#short_name ⇒ Object
Returns the value of attribute short_name.
-
#usage_count ⇒ Object
Returns the value of attribute usage_count.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(original_name: nil, full_path: nil, short_name: nil, usage_count: nil, definition_type: nil, scope_path: nil) ⇒ ConstantInfo
constructor
steep:ignore UndeclaredMethodDefinition.
Constructor Details
#initialize(original_name: nil, full_path: nil, short_name: nil, usage_count: nil, definition_type: nil, scope_path: nil) ⇒ ConstantInfo
steep:ignore UndeclaredMethodDefinition
36 37 38 39 40 41 42 43 44 45 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 36 def initialize(original_name: nil, full_path: nil, short_name: nil, # steep:ignore UndeclaredMethodDefinition usage_count: nil, definition_type: nil, scope_path: nil) # @type self: ConstantInfo self.original_name = original_name self.full_path = full_path || [] self.short_name = short_name self.usage_count = usage_count || 0 self.definition_type = definition_type self.scope_path = scope_path || [] end |
Instance Attribute Details
#definition_type ⇒ Object
Returns the value of attribute definition_type
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def definition_type @definition_type end |
#full_path ⇒ Object
Returns the value of attribute full_path
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def full_path @full_path end |
#original_name ⇒ Object
Returns the value of attribute original_name
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def original_name @original_name end |
#scope_path ⇒ Object
Returns the value of attribute scope_path
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def scope_path @scope_path end |
#short_name ⇒ Object
Returns the value of attribute short_name
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def short_name @short_name end |
#usage_count ⇒ Object
Returns the value of attribute usage_count
27 28 29 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 27 def usage_count @usage_count end |
Class Method Details
.new ⇒ ConstantInfo
21 |
# File 'sig/ryac/analysis/constant/rename_mapping.rbs', line 21 def self.new: (?original_name: Symbol?, ?full_path: Array[Symbol]?, ?short_name: String?, ?usage_count: Integer?, ?definition_type: Symbol?, ?scope_path: Array[Symbol]?) -> ConstantInfo |