Created
April 23, 2012 20:35
-
-
Save catchamonkey/2473665 to your computer and use it in GitHub Desktop.
new Sedlmayr()
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
<?php | |
class Sedlmayr { | |
private $_gender; | |
private $_name; | |
public function __construct() | |
{ | |
$this->_gender = 'unknown'; | |
$this->_name = 'unknown'; | |
} | |
public function getReleaseDate() | |
{ | |
return new DateTime('23rd October 2012'); | |
} | |
public function isAwesome() | |
{ | |
// OMFG YEAH! is returned as true; | |
return true; | |
} | |
} | |
$baby = new Sedlmayr(); |
class Sedlmayr
attr_reader :release_date
def initialize
@gender = 'unknown'
@name = 'unknown'
@release_date = "23rd October 2012"
end
def is_awesome?
true
end
end
baby = Sedlmayr.new
My ruby contribution for your new arrival. Working on a version in Haskell as we speak.
You're missing this...
<?php
private $_takesAfter;
public function setTakesAfter($parent)
{
$this->_takesAfter = $parent;
}
Then we can hope that:
<?php
$baby = new Sedlmayr();
$baby->setTakesAfter('Anne');
:-)
Congratulations my friend, you'll both make epic parents I've no doubt.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice.