Class: Steep::Diagnostic::Ruby::IncompatibleArgumentForwarding
- Includes:
- Steep::Diagnostic::ResultPrinter2
- Defined in:
- lib/steep/diagnostic/ruby.rb
Instance Attribute Summary collapse
-
#block_pair ⇒ Object
readonly
Returns the value of attribute block_pair.
-
#method_name ⇒ Object
readonly
Returns the value of attribute method_name.
-
#params_pair ⇒ Object
readonly
Returns the value of attribute params_pair.
-
#result ⇒ Object
readonly
Returns the value of attribute result.
Attributes inherited from Base
Instance Method Summary collapse
- #header_line ⇒ Object
-
#initialize(method_name:, node:, params_pair: nil, block_pair: nil, result:) ⇒ IncompatibleArgumentForwarding
constructor
A new instance of IncompatibleArgumentForwarding.
Methods included from Steep::Diagnostic::ResultPrinter2
Methods inherited from Base
#detail_lines, #diagnostic_code
Methods included from Helper
Constructor Details
#initialize(method_name:, node:, params_pair: nil, block_pair: nil, result:) ⇒ IncompatibleArgumentForwarding
Returns a new instance of IncompatibleArgumentForwarding.
899 900 901 902 903 904 905 |
# File 'lib/steep/diagnostic/ruby.rb', line 899 def initialize(method_name:, node:, params_pair: nil, block_pair: nil, result:) super(node: node) @method_name = method_name @result = result @params_pair = params_pair @block_pair = block_pair end |
Instance Attribute Details
#block_pair ⇒ Object (readonly)
Returns the value of attribute block_pair.
897 898 899 |
# File 'lib/steep/diagnostic/ruby.rb', line 897 def block_pair @block_pair end |
#method_name ⇒ Object (readonly)
Returns the value of attribute method_name.
897 898 899 |
# File 'lib/steep/diagnostic/ruby.rb', line 897 def method_name @method_name end |
#params_pair ⇒ Object (readonly)
Returns the value of attribute params_pair.
897 898 899 |
# File 'lib/steep/diagnostic/ruby.rb', line 897 def params_pair @params_pair end |
#result ⇒ Object (readonly)
Returns the value of attribute result.
897 898 899 |
# File 'lib/steep/diagnostic/ruby.rb', line 897 def result @result end |
Instance Method Details
#header_line ⇒ Object
909 910 911 912 913 914 915 916 917 918 |
# File 'lib/steep/diagnostic/ruby.rb', line 909 def header_line case when params_pair "Cannot forward arguments to `#{method_name}`:" when block_pair "Cannot forward block to `#{method_name}`:" else raise end end |