Class: RubyCop::Ruby::Class

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



26
27
28
29
30
# File 'lib/ruby_cop/ruby/constants.rb', line 26

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



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

def body
  @body
end

#constObject (readonly)

Returns the value of attribute const.



32
33
34
# File 'lib/ruby_cop/ruby/constants.rb', line 32

def const
  @const
end

#superclassObject (readonly)

Returns the value of attribute superclass.



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

def superclass
  @superclass
end