Exception: Steep::Interface::Instantiated::InvalidIvarOverrideError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, ivar_name:, current_ivar_type:, super_ivar_type:) ⇒ InvalidIvarOverrideError



44
45
46
47
48
49
50
51
# File 'lib/steep/interface/instantiated.rb', line 44

def initialize(type:, ivar_name:, current_ivar_type:, super_ivar_type:)
  @type = type
  @ivar_name = ivar_name
  @current_ivar_type = current_ivar_type
  @super_ivar_type = super_ivar_type

  super "Invalid override of `#{ivar_name}` in #{type}: #{current_ivar_type} is not compatible with #{super_ivar_type}"
end

Instance Attribute Details

#current_ivar_typeObject (readonly)

Returns the value of attribute current_ivar_type.



41
42
43
# File 'lib/steep/interface/instantiated.rb', line 41

def current_ivar_type
  @current_ivar_type
end

#ivar_nameObject (readonly)

Returns the value of attribute ivar_name.



40
41
42
# File 'lib/steep/interface/instantiated.rb', line 40

def ivar_name
  @ivar_name
end

#super_ivar_typeObject (readonly)

Returns the value of attribute super_ivar_type.



42
43
44
# File 'lib/steep/interface/instantiated.rb', line 42

def super_ivar_type
  @super_ivar_type
end

#typeObject (readonly)

Returns the value of attribute type.



39
40
41
# File 'lib/steep/interface/instantiated.rb', line 39

def type
  @type
end