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.



113
114
115
116
117
# File 'lib/steep/errors.rb', line 113

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

Instance Attribute Details

#actualObject (readonly)

Returns the value of attribute actual.



111
112
113
# File 'lib/steep/errors.rb', line 111

def actual
  @actual
end

#expectedObject (readonly)

Returns the value of attribute expected.



110
111
112
# File 'lib/steep/errors.rb', line 110

def expected
  @expected
end

Instance Method Details

#to_sObject



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

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