| Dependency Injection: Vital or Irrelevant? | [ Prev | Home | Next ] |
class PotSensor
def coffee_present?
...
end
end
class Heater
def on() ... end
def off() ... end
end
Again, the "…" represents code that is strongly dependent on the hardware.
| O'REILLY® OSCON 2005 | Copyright © 2005 by Jim Weirich (Some Rights Reserved) |