Class: RubyCop::Ruby::Call
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#block ⇒ Object
Returns the value of attribute block.
-
#identifier ⇒ Object
readonly
Returns the value of attribute identifier.
-
#target ⇒ Object
readonly
Returns the value of attribute target.
Instance Method Summary collapse
- #assignment(rvalue, operator) ⇒ Object
-
#initialize(target, identifier, arguments = nil, block = nil) ⇒ Call
constructor
A new instance of Call.
Methods inherited from Node
Constructor Details
#initialize(target, identifier, arguments = nil, block = nil) ⇒ Call
Returns a new instance of Call.
4 5 6 7 8 9 |
# File 'lib/ruby_cop/ruby/call.rb', line 4 def initialize(target, identifier, arguments=nil, block=nil) @target = target @identifier = identifier @arguments = arguments @block = block end |
Instance Attribute Details
#arguments ⇒ Object
Returns the value of attribute arguments.
13 14 15 |
# File 'lib/ruby_cop/ruby/call.rb', line 13 def arguments @arguments end |
#block ⇒ Object
Returns the value of attribute block.
14 15 16 |
# File 'lib/ruby_cop/ruby/call.rb', line 14 def block @block end |
#identifier ⇒ Object (readonly)
Returns the value of attribute identifier.
12 13 14 |
# File 'lib/ruby_cop/ruby/call.rb', line 12 def identifier @identifier end |
#target ⇒ Object (readonly)
Returns the value of attribute target.
11 12 13 |
# File 'lib/ruby_cop/ruby/call.rb', line 11 def target @target end |
Instance Method Details
#assignment(rvalue, operator) ⇒ Object
16 17 18 |
# File 'lib/ruby_cop/ruby/call.rb', line 16 def assignment(rvalue, operator) self.class.new(@target, Identifier.new("#{@identifier.token}=", @identifier.position), @arguments, @block) end |