Exception: RBS::UnknownMethodAliasError
- Inherits:
-
StandardError
- Object
- StandardError
- RBS::UnknownMethodAliasError
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#aliased_name ⇒ Object
readonly
Returns the value of attribute aliased_name.
-
#location ⇒ Object
readonly
Returns the value of attribute location.
-
#original_name ⇒ Object
readonly
Returns the value of attribute original_name.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(original_name:, aliased_name:, location:) ⇒ UnknownMethodAliasError
constructor
A new instance of UnknownMethodAliasError.
Constructor Details
#initialize(original_name:, aliased_name:, location:) ⇒ UnknownMethodAliasError
Returns a new instance of UnknownMethodAliasError.
130 131 132 133 134 135 136 |
# File 'lib/rbs/errors.rb', line 130 def initialize(original_name:, aliased_name:, location:) @original_name = original_name @aliased_name = aliased_name @location = location super "#{Location.to_string location}: Unknown method alias name: #{original_name} => #{aliased_name}" end |
Instance Attribute Details
#aliased_name ⇒ Object (readonly)
Returns the value of attribute aliased_name.
127 128 129 |
# File 'lib/rbs/errors.rb', line 127 def aliased_name @aliased_name end |
#location ⇒ Object (readonly)
Returns the value of attribute location.
128 129 130 |
# File 'lib/rbs/errors.rb', line 128 def location @location end |
#original_name ⇒ Object (readonly)
Returns the value of attribute original_name.
126 127 128 |
# File 'lib/rbs/errors.rb', line 126 def original_name @original_name end |
Class Method Details
.check!(methods:, original_name:, aliased_name:, location:) ⇒ Object
138 139 140 141 142 |
# File 'lib/rbs/errors.rb', line 138 def self.check!(methods:, original_name:, aliased_name:, location:) unless methods.key?(original_name) raise new(original_name: original_name, aliased_name: aliased_name, location: location) end end |