Skip to content

Instantly share code, notes, and snippets.

@catchamonkey
Created April 23, 2012 20:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save catchamonkey/2473665 to your computer and use it in GitHub Desktop.
Save catchamonkey/2473665 to your computer and use it in GitHub Desktop.
new Sedlmayr()
<?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();
@buddhamagnet
Copy link

Nice.

@buddhamagnet
Copy link

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

@buddhamagnet
Copy link

My ruby contribution for your new arrival. Working on a version in Haskell as we speak.

@parkji
Copy link

parkji commented Apr 24, 2012

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