Class: Ryac::ExternalPrefixInfo
- Inherits:
-
Struct
- Object
- Struct
- Ryac::ExternalPrefixInfo
- Defined in:
- lib/ryac/analysis/constant/rename_mapping.rb,
sig/ryac/analysis/constant/rename_mapping.rbs
Overview
Represents an external library constant prefix that can be aliased
Instance Attribute Summary collapse
-
#char_savings ⇒ Object
Returns the value of attribute char_savings.
-
#prefix_path ⇒ Object
Returns the value of attribute prefix_path.
-
#prefix_string ⇒ Object
Returns the value of attribute prefix_string.
-
#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(prefix_path: nil, prefix_string: nil, short_name: nil, usage_count: nil, char_savings: nil) ⇒ ExternalPrefixInfo
constructor
steep:ignore UndeclaredMethodDefinition.
Constructor Details
#initialize(prefix_path: nil, prefix_string: nil, short_name: nil, usage_count: nil, char_savings: nil) ⇒ ExternalPrefixInfo
steep:ignore UndeclaredMethodDefinition
15 16 17 18 19 20 21 22 23 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 15 def initialize(prefix_path: nil, prefix_string: nil, short_name: nil, # steep:ignore UndeclaredMethodDefinition usage_count: nil, char_savings: nil) # @type self: ExternalPrefixInfo self.prefix_path = prefix_path || [] self.prefix_string = prefix_string self.short_name = short_name self.usage_count = usage_count || 0 self.char_savings = char_savings || 0 end |
Instance Attribute Details
#char_savings ⇒ Object
Returns the value of attribute char_savings
7 8 9 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 7 def char_savings @char_savings end |
#prefix_path ⇒ Object
Returns the value of attribute prefix_path
7 8 9 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 7 def prefix_path @prefix_path end |
#prefix_string ⇒ Object
Returns the value of attribute prefix_string
7 8 9 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 7 def prefix_string @prefix_string end |
#short_name ⇒ Object
Returns the value of attribute short_name
7 8 9 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 7 def short_name @short_name end |
#usage_count ⇒ Object
Returns the value of attribute usage_count
7 8 9 |
# File 'lib/ryac/analysis/constant/rename_mapping.rb', line 7 def usage_count @usage_count end |
Class Method Details
.new ⇒ ExternalPrefixInfo
9 |
# File 'sig/ryac/analysis/constant/rename_mapping.rbs', line 9
def self.new: (?prefix_path: Array[Symbol]?, ?prefix_string: String?, ?short_name: String?, ?usage_count: Integer?, ?char_savings: Integer?) -> ExternalPrefixInfo
|