Class: Rubycop::Analyzer::Ruby::Method

Inherits:
Node
  • Object
show all
Defined in:
lib/rubycop/analyzer/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.



5
6
7
8
9
10
# File 'lib/rubycop/analyzer/ruby/definitions.rb', line 5

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.



15
16
17
# File 'lib/rubycop/analyzer/ruby/definitions.rb', line 15

def body
  @body
end

#identifierObject (readonly)

Returns the value of attribute identifier.



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

def identifier
  @identifier
end

#paramsObject (readonly)

Returns the value of attribute params.



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

def params
  @params
end

#targetObject (readonly)

Returns the value of attribute target.



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

def target
  @target
end