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

Inherits:
Node
  • Object
show all
Defined in:
lib/rubycop/analyzer/ruby/constants.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Node

#accept

Constructor Details

#initialize(const, superclass, body) ⇒ Class

Returns a new instance of Class.



27
28
29
30
31
# File 'lib/rubycop/analyzer/ruby/constants.rb', line 27

def initialize(const, superclass, body)
  @const = const
  @superclass = superclass
  @body = body
end

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



35
36
37
# File 'lib/rubycop/analyzer/ruby/constants.rb', line 35

def body
  @body
end

#constObject (readonly)

Returns the value of attribute const.



33
34
35
# File 'lib/rubycop/analyzer/ruby/constants.rb', line 33

def const
  @const
end

#superclassObject (readonly)

Returns the value of attribute superclass.



34
35
36
# File 'lib/rubycop/analyzer/ruby/constants.rb', line 34

def superclass
  @superclass
end