- RubyLanguage
- RubyLanguage/Class
- RubyLanguage/Container
- RubyLanguage/ExceptionHandling
- RubyLanguage/InputOutput
3. 모듈 ¶
- ��������������� ��� ��� ���는 ��������
- Class ��������는 Module ����������� ���브 ��������
- �������� = 모듈 + ��������������� 능���
- �������� = 모듈 + ��������������� 능���
- ���능
- Mix-in
- Namespace
- Mix-in
3.1. Mix-in ¶
- �������� ������������
- Ruby는 ������������만��� ������������.
- 따������ ��������는 �����만 ��������� ��� ������.
- ���러�� 모듈��� ���러���를 ������받��� ��� ������.
- 따������ ��������는 �����만 ��������� ��� ������.
- Ruby는 ������������만��� ������������.
- Include : ����������� 모듈��� ������받는 ���.
3.2. Namespace ¶
// 1 class Service end // 2 module Library class Service end end
- ������ Service ��������는 ��������� ���벨��� namespace��� ������ ������, 뒤��� Service ��������는 Library 모듈��� ������ ������.
1��� ��������� ������ ��������� ��� ������.
Service���는
::Service
2 는 ��������� ������.
Library::Service