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.



36
37
38
39
40
41
42
43
# File 'lib/steep/interface/instantiated.rb', line 36

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.



32
33
34
# File 'lib/steep/interface/instantiated.rb', line 32

def current_method
  @current_method
end

#resultObject (readonly)

Returns the value of attribute result.



34
35
36
# File 'lib/steep/interface/instantiated.rb', line 34

def result
  @result
end

#super_methodObject (readonly)

Returns the value of attribute super_method.



33
34
35
# File 'lib/steep/interface/instantiated.rb', line 33

def super_method
  @super_method
end

#typeObject (readonly)

Returns the value of attribute type.



31
32
33
# File 'lib/steep/interface/instantiated.rb', line 31

def type
  @type
end