Exception: Steep::Interface::Instantiated::PrivateOverrideError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(child_type:, super_type:, method_name:) ⇒ PrivateOverrideError

Returns a new instance of PrivateOverrideError.



67
68
69
70
71
72
73
# File 'lib/steep/interface/instantiated.rb', line 67

def initialize(child_type:, super_type:, method_name:)
  @child_type = child_type
  @super_type = super_type
  @method_name = method_name

  super "Public method `#{method_name}` cannot overriden to private: #{child_type} <: #{super_type}"
end

Instance Attribute Details

#child_typeObject (readonly)

Returns the value of attribute child_type.



63
64
65
# File 'lib/steep/interface/instantiated.rb', line 63

def child_type
  @child_type
end

#method_nameObject (readonly)

Returns the value of attribute method_name.



65
66
67
# File 'lib/steep/interface/instantiated.rb', line 65

def method_name
  @method_name
end

#super_typeObject (readonly)

Returns the value of attribute super_type.



64
65
66
# File 'lib/steep/interface/instantiated.rb', line 64

def super_type
  @super_type
end