Class: Steep::Errors::UnexpectedBlockGiven
- Defined in:
- lib/steep/errors.rb
Instance Attribute Summary collapse
-
#method_type ⇒ Object
readonly
Returns the value of attribute method_type.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(node:, method_type:) ⇒ UnexpectedBlockGiven
constructor
A new instance of UnexpectedBlockGiven.
- #to_s ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(node:, method_type:) ⇒ UnexpectedBlockGiven
Returns a new instance of UnexpectedBlockGiven.
161 162 163 164 |
# File 'lib/steep/errors.rb', line 161 def initialize(node:, method_type:) super(node: node) @method_type = method_type end |
Instance Attribute Details
#method_type ⇒ Object (readonly)
Returns the value of attribute method_type.
159 160 161 |
# File 'lib/steep/errors.rb', line 159 def method_type @method_type end |
Instance Method Details
#to_s ⇒ Object
166 167 168 |
# File 'lib/steep/errors.rb', line 166 def to_s "#{location_to_str}: UnexpectedBlockGiven: method_type=#{method_type.location&.source}" end |