]> gitweb.michael.orlitzky.com - mailshears.git/blob - lib/common/domain.rb
Clean up user/domain describing in the plugins.
[mailshears.git] / lib / common / domain.rb
1 require 'common/errors'
2
3 class Domain
4
5 @domain = nil
6
7 def initialize(domain)
8 if domain.empty? then
9 msg = "domain cannot be empty"
10 raise InvalidDomainError.new(msg)
11 end
12
13 @domain = domain
14 end
15
16 def to_s()
17 return @domain
18 end
19
20 def ==(other)
21 return self.to_s() == other.to_s()
22 end
23 end