Class: RubyCop::Ruby::Method

Inherits:
Node
  • Object
show all
Defined in:
lib/ruby_cop/ruby/definitions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(target, identifier, params, body) ⇒ Method

Returns a new instance of Method.



4
5
6
7
8
9
# File 'lib/ruby_cop/ruby/definitions.rb', line 4

def initialize(target, identifier, params, body)
  @target     = target
  @identifier = identifier
  @params     = params
  @body       = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



14
15
16
# File 'lib/ruby_cop/ruby/definitions.rb', line 14

def body
  @body
end

#identifierObject (readonly)

Returns the value of attribute identifier.



12
13
14
# File 'lib/ruby_cop/ruby/definitions.rb', line 12

def identifier
  @identifier
end

#paramsObject (readonly)

Returns the value of attribute params.



13
14
15
# File 'lib/ruby_cop/ruby/definitions.rb', line 13

def params
  @params
end

#targetObject (readonly)

Returns the value of attribute target.



11
12
13
# File 'lib/ruby_cop/ruby/definitions.rb', line 11

def target
  @target
end