Skip to content

Instantly share code, notes, and snippets.

@bobbytables
Created December 10, 2012 08:11
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 bobbytables/4249233 to your computer and use it in GitHub Desktop.
Save bobbytables/4249233 to your computer and use it in GitHub Desktop.
class BobbyTables
  attr_accessor :tied_shoes

  def tied_shoes?
    !!tied_shoes
  end

  def tie_shoes!
    self.tied_shoes = true
  end
end

class MommyTables
  def tie_shoe(person)
    person.tie_shoes!
  end
end

bobby_t = BobbyTables.new
momma_t = MommyTables.new
momma_t.tie_shoe(bobby_t)
class SBOwner
  attr_accessor :money

  def pay_invoice(invoice)
    self.money = self.money - invoice.balance
    invoice.paid!
  end

  def meet_with_client(client)
    shake_hands_with(client)
  end

  def package_deliverable(deliverable)
    deliveries << deliverable
  end

  def send_deliveries!
    deliveries.send
  end
end
class SBOwner
  def meet_with_client(client)
    shake_hands_with(client)
  end
end

class Accountant
  attr_accessor :money

  def pay_invoice(invoice)
    self.money = self.money - invoice.balance
    invoice.paid!
  end
end

class Courier
  attr_accessor :deliveries

  def package_deliverable(deliverable)
    deliveries << deliverable
  end

  def send_deliveries!
    deliveries.send
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment