Class: Steep::Errors::BlockParameterTypeMismatch

Inherits:
Base
  • Object
show all
Defined in:
lib/steep/errors.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#node

Instance Method Summary collapse

Methods inherited from Base

#location_to_str, #print_to

Constructor Details

#initialize(node:, expected:, actual:) ⇒ BlockParameterTypeMismatch

Returns a new instance of BlockParameterTypeMismatch.



122
123
124
125
126
# File 'lib/steep/errors.rb', line 122

def initialize(node:, expected:, actual:)
  super(node: node)
  @expected = expected
  @actual = actual
end

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



120
121
122
# File 'lib/steep/errors.rb', line 120

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



119
120
121
# File 'lib/steep/errors.rb', line 119

def expected
  @expected
end

Instance Method Details

#to_sObject



128
129
130
# File 'lib/steep/errors.rb', line 128

def to_s
  "#{location_to_str}: BlockParameterTypeMismatch: expected=#{expected}, actual=#{actual}"
end