Two programmers in one

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest. →

Two programmers in one

My RubyNation 2014 talk

Jano González

June 07, 2014

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

105 slides
  1. THINKER class AccountProtectionProxy def initialize(real_account, owner) @subject = real_account @owner

    = owner end ! def method_missing(name, *args) check_access @subject.send(name, *args) end ...
  2. EXAMPLE case account_type when :premium then # do stuff when

    :standard then # do stuff when :personal then # do stuff end
  3. EXAMPLE class PremiumAccount def initialize # do stuff end !

    def execute(context) # do stuff end end

More Decks by Jano González

Other Decks in Programming