Created
February 15, 2012 16:22
-
-
Save nabetama/1837030 to your computer and use it in GitHub Desktop.
Test for HatenaBlog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# encoding: utf-8 | |
# name space | |
module Cook; end | |
# スープに塩を加える | |
module Cook::Salt | |
def self.included(klass) | |
klass.extend(ClassModule) | |
end | |
module ClassModule | |
def add_salt | |
p "Salt seasons all things." | |
end | |
end | |
end | |
class Soup | |
include Cook::Salt | |
def initialize() | |
super | |
end | |
end | |
Soup.add_salt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment