Class: Steep::Errors::NoMethod

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:, type:, method:) ⇒ NoMethod

Returns a new instance of NoMethod.



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

def initialize(node:, type:, method:)
  super(node: node)
  @type = type
  @method = method
end

Instance Attribute Details

#methodObject (readonly)

Returns the value of attribute method.



126
127
128
# File 'lib/steep/errors.rb', line 126

def method
  @method
end

#typeObject (readonly)

Returns the value of attribute type.



125
126
127
# File 'lib/steep/errors.rb', line 125

def type
  @type
end

Instance Method Details

#to_sObject



134
135
136
# File 'lib/steep/errors.rb', line 134

def to_s
  "#{location_to_str}: NoMethodError: type=#{type}, method=#{method}"
end