diff --git a/.gemified b/.gemified new file mode 100644 index 0000000..df22b4c --- /dev/null +++ b/.gemified @@ -0,0 +1,7 @@ +--- +:author: Jesse Newland +:version: "0.1" +:name: boolean_web_service +:summary: BooleanWebService(:isitchristmas) => false. Well, unless it's christmas. Then it'd be true. +:email: jnewland@gmail.com +:homepage: http://github.com/jnewland/boolean_web_service diff --git a/lib/boolean_web_service.rb b/lib/boolean_web_service.rb new file mode 100644 index 0000000..f18f799 --- /dev/null +++ b/lib/boolean_web_service.rb @@ -0,0 +1,8 @@ +require 'open-uri' + +def BooleanWebService(address) + address = address.to_s + address += '.com' if address.split('.').size == 1 + match = open("http://#{address}").read =~ /yes/i + !match.nil? +end \ No newline at end of file