Exception: RBS::InconsistentMethodVisibilityError
- Inherits:
-
StandardError
- Object
- StandardError
- RBS::InconsistentMethodVisibilityError
- Defined in:
- lib/rbs/errors.rb
Instance Attribute Summary collapse
-
#kind ⇒ Object
readonly
Returns the value of attribute kind.
-
#member_pairs ⇒ Object
readonly
Returns the value of attribute member_pairs.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
Instance Method Summary collapse
-
#initialize(type_name:, method_name:, kind:, member_pairs:) ⇒ InconsistentMethodVisibilityError
constructor
A new instance of InconsistentMethodVisibilityError.
Constructor Details
#initialize(type_name:, method_name:, kind:, member_pairs:) ⇒ InconsistentMethodVisibilityError
Returns a new instance of InconsistentMethodVisibilityError.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/rbs/errors.rb', line 275 def initialize(type_name:, method_name:, kind:, member_pairs:) @type_name = type_name @method_name = method_name @kind = kind @member_pairs = member_pairs delimiter = case kind when :instance "#" when :singleton "." end super "#{Location.to_string member_pairs[0][0].location}: Inconsistent method visibility: #{type_name}#{delimiter}#{method_name}" end |
Instance Attribute Details
#kind ⇒ Object (readonly)
Returns the value of attribute kind.
272 273 274 |
# File 'lib/rbs/errors.rb', line 272 def kind @kind end |
#member_pairs ⇒ Object (readonly)
Returns the value of attribute member_pairs.
273 274 275 |
# File 'lib/rbs/errors.rb', line 273 def member_pairs @member_pairs end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
271 272 273 |
# File 'lib/rbs/errors.rb', line 271 def method_name @method_name end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
270 271 272 |
# File 'lib/rbs/errors.rb', line 270 def type_name @type_name end |