Class: RubyCop::Ruby::SingletonClass

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(superclass, body) ⇒ SingletonClass

Returns a new instance of SingletonClass.



38
39
40
41
# File 'lib/ruby_cop/ruby/constants.rb', line 38

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

Instance Attribute Details

#bodyObject (readonly)

Returns the value of attribute body.



44
45
46
# File 'lib/ruby_cop/ruby/constants.rb', line 44

def body
  @body
end

#superclassObject (readonly)

Returns the value of attribute superclass.



43
44
45
# File 'lib/ruby_cop/ruby/constants.rb', line 43

def superclass
  @superclass
end