Created
March 8, 2012 00:24
-
-
Save keesun/1997538 to your computer and use it in GitHub Desktop.
[BoR] chapter 1
This file contains hidden or 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
| s = 'Keesun'; | |
| puts "Hello #{s}, #{2000 + 12}" | |
| if(true) then | |
| puts "Puss int the Boots" | |
| end | |
| class Company | |
| $founder = "Toby" | |
| def initialize(name) | |
| @name = name; | |
| end | |
| def set_name(name) | |
| @name = name | |
| end | |
| def get_name | |
| @name | |
| end | |
| #def to_s | |
| # "name: #{@name}" | |
| #end | |
| def show | |
| employee = "Keesun" | |
| puts "The founder is #{$founder}. and one employee is #{employee}" | |
| end | |
| end | |
| epril = Company.new("Epril'") | |
| puts epril.get_name | |
| puts epril | |
| puts epril.inspect | |
| p(epril) | |
| epril.show | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment