Class: RubyLint::MethodCall::Base
- Inherits:
-
Object
- Object
- RubyLint::MethodCall::Base
- Defined in:
- lib/ruby-lint/method_call/base.rb
Overview
Base class for the various method call handlers, takes care of some of the common boilerplate code.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#node ⇒ RubyLint::AST::Node
readonly
-
#vm ⇒ RubyLint::VirtualMachine
readonly
Instance Method Summary collapse
-
#evaluate(arguments, context, block = nil) ⇒ Object
:nocov:.
-
#initialize(node, vm) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(node, vm) ⇒ Base
Returns a new instance of Base
20 21 22 23 |
# File 'lib/ruby-lint/method_call/base.rb', line 20 def initialize(node, vm) @node = node @vm = vm end |
Instance Attribute Details
#node ⇒ RubyLint::AST::Node (readonly)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby-lint/method_call/base.rb', line 13 class Base attr_reader :node, :vm ## # @param [RubyLint::AST::Node] node # @param [RubyLint::VirtualMachine] vm # def initialize(node, vm) @node = node @vm = vm end ## # @param [Array] arguments # @param [RubyLint::Definition::RubyObject] context # @param [RubyLint::Definition::RubyObject] block # #:nocov: def evaluate(arguments, context, block = nil) raise NotImplementedError, '#evaluate must be implemented' end #:nocov: end |
#vm ⇒ RubyLint::VirtualMachine (readonly)
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/ruby-lint/method_call/base.rb', line 13 class Base attr_reader :node, :vm ## # @param [RubyLint::AST::Node] node # @param [RubyLint::VirtualMachine] vm # def initialize(node, vm) @node = node @vm = vm end ## # @param [Array] arguments # @param [RubyLint::Definition::RubyObject] context # @param [RubyLint::Definition::RubyObject] block # #:nocov: def evaluate(arguments, context, block = nil) raise NotImplementedError, '#evaluate must be implemented' end #:nocov: end |
Instance Method Details
#evaluate(arguments, context, block = nil) ⇒ Object
:nocov:
31 32 33 |
# File 'lib/ruby-lint/method_call/base.rb', line 31 def evaluate(arguments, context, block = nil) raise NotImplementedError, '#evaluate must be implemented' end |