summaryrefslogtreecommitdiff
path: root/lib/nickserver/lookup.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/nickserver/lookup.rb')
-rw-r--r--lib/nickserver/lookup.rb31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/nickserver/lookup.rb b/lib/nickserver/lookup.rb
deleted file mode 100644
index 105e77e..0000000
--- a/lib/nickserver/lookup.rb
+++ /dev/null
@@ -1,31 +0,0 @@
-require 'nickserver/invalid_source'
-
-module Nickserver
- class Lookup
-
- attr_reader :nick
-
- def initialize(nick)
- @nick = nick
- end
-
- def respond_with(responder)
- query do |status, content|
- responder.send_response status: status, content: content
- end
- end
-
- protected
-
- def query(&block)
- source.query nick, &block
- end
-
- def source
- if nick.invalid? then Nickserver::InvalidSource
- elsif nick.local? then Nickserver::Config.local_source
- else Nickserver::Config.remote_source
- end
- end
- end
-end