나는 어떤 코드를 이해하려고 노력하는 사람입니다.루비에서는 다음과 같은 정의가 있습니다 : self.class.method
이 self.class.current_section의 기능은 무엇입니까?
class MyClass
class << self
def current_section(*section)
if section.empty?
@current_section
else
@current_section = section[0]
end
end
end
def current_section()
self.class.current_section
end
def current_section=(section)
self.class.current_section(section)
end
end