Class: LiveJournal::Server
- Inherits:
-
Object
- Object
- LiveJournal::Server
- Defined in:
- lib/livejournal/basic.rb
Overview
A LiveJournal server. name is currently unused.
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #==(server) ⇒ Object
- #host ⇒ Object
-
#initialize(name, url) ⇒ Server
constructor
A new instance of Server.
- #port ⇒ Object
- #use_ssl ⇒ Object
Constructor Details
#initialize(name, url) ⇒ Server
Returns a new instance of Server.
30 31 32 33 |
# File 'lib/livejournal/basic.rb', line 30 def initialize(name, url) @name = name @url = url end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
28 29 30 |
# File 'lib/livejournal/basic.rb', line 28 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
28 29 30 |
# File 'lib/livejournal/basic.rb', line 28 def url @url end |
Instance Method Details
#==(server) ⇒ Object
47 48 49 |
# File 'lib/livejournal/basic.rb', line 47 def ==(server) host == server.host end |
#host ⇒ Object
35 36 37 |
# File 'lib/livejournal/basic.rb', line 35 def host uri.host end |
#port ⇒ Object
39 40 41 |
# File 'lib/livejournal/basic.rb', line 39 def port uri.port end |
#use_ssl ⇒ Object
43 44 45 |
# File 'lib/livejournal/basic.rb', line 43 def use_ssl uri.scheme == "https" end |