Class: RubyLint::MethodCallInfo
- Inherits:
-
Object
- Object
- RubyLint::MethodCallInfo
- Defined in:
- lib/ruby-lint/method_call_info.rb
Overview
The MethodCallInfo class stores basic information about method calls such as the definition of the method and location information of the method call.
Instance Attribute Summary collapse
-
#column ⇒ Numeric
readonly
The column of the method call.
-
#definition ⇒ RubyLint::Definition::RubyMethod
readonly
-
#file ⇒ String
readonly
The file of the method call.
-
#line ⇒ Numeric
readonly
The line of the method call.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MethodCallInfo
constructor
A new instance of MethodCallInfo.
Constructor Details
#initialize(options = {}) ⇒ MethodCallInfo
Returns a new instance of MethodCallInfo
25 26 27 28 29 |
# File 'lib/ruby-lint/method_call_info.rb', line 25 def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) if respond_to?(key) end end |
Instance Attribute Details
#column ⇒ Numeric (readonly)
Returns The column of the method call.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby-lint/method_call_info.rb', line 19 class MethodCallInfo attr_reader :definition, :line, :column, :file ## # @param [Hash] options # def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) if respond_to?(key) end end end |
#definition ⇒ RubyLint::Definition::RubyMethod (readonly)
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby-lint/method_call_info.rb', line 19 class MethodCallInfo attr_reader :definition, :line, :column, :file ## # @param [Hash] options # def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) if respond_to?(key) end end end |
#file ⇒ String (readonly)
Returns The file of the method call.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby-lint/method_call_info.rb', line 19 class MethodCallInfo attr_reader :definition, :line, :column, :file ## # @param [Hash] options # def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) if respond_to?(key) end end end |
#line ⇒ Numeric (readonly)
Returns The line of the method call.
19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/ruby-lint/method_call_info.rb', line 19 class MethodCallInfo attr_reader :definition, :line, :column, :file ## # @param [Hash] options # def initialize( = {}) .each do |key, value| instance_variable_set("@#{key}", value) if respond_to?(key) end end end |