== Usage
gem 'zombie_apocalypse', :git => 'git://gist.github.com/3215262.git'
Zombie::Apocalypse.instance.yet? # => true/false
# -*- encoding: utf-8 -*- | |
Gem::Specification.new do |s| | |
s.name = %q{zombie_apocalypse} | |
s.version = '1.0.0' | |
s.summary = %q{Zombie apocalypse is imminent.} | |
s.description = %q{Zombie apocalypse is imminent. Learn about it before others!} | |
s.authors = ["Mike Połtyn", "Michael Bumann"] | |
s.date = %q{2012-07-31} | |
s.email = %q{mike@poltyn.com} | |
s.homepage = %q{http://mike.poltyn.com} | |
s.extra_rdoc_files = [ | |
"README.md" | |
] | |
s.executables = nil | |
s.files = ['zombie_apocalypse.rb'] | |
s.test_files = nil | |
s.add_runtime_dependency 'open-uri' | |
s.add_runtime_dependency 'singleton' | |
end |
require "open-uri" | |
require "singleton" | |
module Zombie | |
class Apocalypse | |
include Singleton | |
def yet? | |
open("http://is-there-a-zombie-apocalypse-yet.info/").read != "no" | |
end | |
end | |
end |