Class: Steep::Errors::UnexpectedBlockGiven

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:, method_type:) ⇒ UnexpectedBlockGiven

Returns a new instance of UnexpectedBlockGiven.



170
171
172
173
# File 'lib/steep/errors.rb', line 170

def initialize(node:, method_type:)
  super(node: node)
  @method_type = method_type
end

Instance Attribute Details

#method_typeObject (readonly)

Returns the value of attribute method_type.



168
169
170
# File 'lib/steep/errors.rb', line 168

def method_type
  @method_type
end

Instance Method Details

#to_sObject



175
176
177
# File 'lib/steep/errors.rb', line 175

def to_s
  "#{location_to_str}: UnexpectedBlockGiven: method_type=#{method_type}"
end