Class: LaGear::UriParser
- Inherits:
-
Object
- Object
- LaGear::UriParser
- Defined in:
- lib/la_gear/uri_parser.rb
Instance Method Summary collapse
- #amqp ⇒ Object
-
#initialize(uri_str) ⇒ UriParser
constructor
A new instance of UriParser.
- #vhost ⇒ Object
Constructor Details
#initialize(uri_str) ⇒ UriParser
Returns a new instance of UriParser.
3 4 5 |
# File 'lib/la_gear/uri_parser.rb', line 3 def initialize(uri_str) @uri = URI(uri_str) end |
Instance Method Details
#amqp ⇒ Object
7 8 9 |
# File 'lib/la_gear/uri_parser.rb', line 7 def amqp "#{@uri.scheme}://#{@uri.userinfo}@#{@uri.host}:#{@uri.port}" end |
#vhost ⇒ Object
11 12 13 |
# File 'lib/la_gear/uri_parser.rb', line 11 def vhost @uri.path.gsub!(/^\//, '') end |