Exception: Steep::Interface::Instantiated::InvalidMethodOverrideError

Inherits:
StandardError
  • Object
show all
Defined in:
lib/steep/interface/instantiated.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, current_method:, super_method:, result:) ⇒ InvalidMethodOverrideError

Returns a new instance of InvalidMethodOverrideError.



28
29
30
31
32
33
34
35
# File 'lib/steep/interface/instantiated.rb', line 28

def initialize(type:, current_method:, super_method:, result:)
  @type = type
  @current_method = current_method
  @super_method = super_method
  @result = result

  super "Invalid override of `#{current_method.name}` in #{type}: definition in #{current_method.type_name} is not compatible with its super (#{super_method.type_name})"
end

Instance Attribute Details

#current_methodObject (readonly)

Returns the value of attribute current_method.



24
25
26
# File 'lib/steep/interface/instantiated.rb', line 24

def current_method
  @current_method
end

#resultObject (readonly)

Returns the value of attribute result.



26
27
28
# File 'lib/steep/interface/instantiated.rb', line 26

def result
  @result
end

#super_methodObject (readonly)

Returns the value of attribute super_method.



25
26
27
# File 'lib/steep/interface/instantiated.rb', line 25

def super_method
  @super_method
end

#typeObject (readonly)

Returns the value of attribute type.



23
24
25
# File 'lib/steep/interface/instantiated.rb', line 23

def type
  @type
end