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

Returns a new instance of InvalidIvarOverrideError.



52
53
54
55
56
57
58
59
# File 'lib/steep/interface/instantiated.rb', line 52

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.



49
50
51
# File 'lib/steep/interface/instantiated.rb', line 49

def current_ivar_type
  @current_ivar_type
end

#ivar_nameObject (readonly)

Returns the value of attribute ivar_name.



48
49
50
# File 'lib/steep/interface/instantiated.rb', line 48

def ivar_name
  @ivar_name
end

#super_ivar_typeObject (readonly)

Returns the value of attribute super_ivar_type.



50
51
52
# File 'lib/steep/interface/instantiated.rb', line 50

def super_ivar_type
  @super_ivar_type
end

#typeObject (readonly)

Returns the value of attribute type.



47
48
49
# File 'lib/steep/interface/instantiated.rb', line 47

def type
  @type
end