lib/earl.rb in earl-0.2.0 vs lib/earl.rb in earl-0.3.0
- old
+ new
@@ -1,19 +1,24 @@
-require 'treetop'
require 'earl/version'
-require 'earl/url_parser'
module Earl
- autoload :URL, 'earl/url'
- autoload :UrlAssembler, 'earl/url_assembler'
- autoload :HashInquirer, 'earl/hash_inquirer'
+ autoload :EntityBase, 'earl/entity_base'
+ autoload :URLEntity, 'earl/url_entity'
+ autoload :URLAssembler, 'earl/url_assembler'
+ autoload :EmailEntity, 'earl/email_entity'
+ autoload :EmailAssembler, 'earl/email_assembler'
+ autoload :HashInquirer, 'earl/hash_inquirer'
autoload :StringInquirer, 'earl/string_inquirer'
class << self
- def parse( string )
- Earl::URL.new string
+ def URL( source )
+ Earl::URLEntity.new source
end
+ def Email( source )
+ Earl::EmailEntity.new source
+ end
end
- class EarlError < StandardError; end
+ class EarlError < StandardError; end
class InvalidURLError < EarlError; end
+ class SubclassError < EarlError; end
end