Created
July 7, 2010 21:51
-
-
Save djsun/467341 to your computer and use it in GitHub Desktop.
This file contains 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
class Puller | |
def initialize(handler) | |
@handler = handler | |
end | |
def run | |
@handler.organization("DOE") | |
@handler.organization("NASA") | |
@handler.source("California Earthquakes") | |
@handler.source("Hawaii Earthquakes") | |
@handler.source("OMB Budget Estimates") | |
end | |
end | |
# the internals of the importer framework | |
class Handler | |
def initialize | |
puts "Handler initialized" | |
end | |
def source(x) | |
puts "Source found : #{x.inspect}" | |
end | |
def organization(x) | |
puts "Organization found : #{x.inspect}" | |
end | |
end | |
handler = Handler.new | |
puller = Puller.new(handler) | |
puller.run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment