Class: WeBee::Api
- Inherits:
-
Object
- Object
- WeBee::Api
- Defined in:
- lib/webee.rb
Class Attribute Summary collapse
-
.host ⇒ Object
Returns the value of attribute host.
-
.password ⇒ Object
Returns the value of attribute password.
-
.port ⇒ Object
Returns the value of attribute port.
-
.url ⇒ Object
Returns the value of attribute url.
-
.user ⇒ Object
Returns the value of attribute user.
Class Method Summary collapse
Class Attribute Details
.host ⇒ Object
Returns the value of attribute host.
80 81 82 |
# File 'lib/webee.rb', line 80 def host @host end |
.password ⇒ Object
Returns the value of attribute password.
80 81 82 |
# File 'lib/webee.rb', line 80 def password @password end |
.port ⇒ Object
Returns the value of attribute port.
80 81 82 |
# File 'lib/webee.rb', line 80 def port @port end |
.url ⇒ Object
Returns the value of attribute url.
80 81 82 |
# File 'lib/webee.rb', line 80 def url @url end |
.user ⇒ Object
Returns the value of attribute user.
80 81 82 |
# File 'lib/webee.rb', line 80 def user @user end |
Class Method Details
.build_url(url) ⇒ Object
86 87 88 89 90 91 |
# File 'lib/webee.rb', line 86 def build_url(url) port ||= 80 uri = URI.parse(url) @host = uri.host "#{uri.scheme}://#{user}:#{password}@#{uri.host}:#{uri.port}#{uri.path}" end |