Class: Codebits::Client
- Inherits:
-
Object
- Object
- Codebits::Client
- Defined in:
- lib/codebits.rb
Instance Attribute Summary collapse
-
#auth ⇒ Object
Returns the value of attribute auth.
-
#conn ⇒ Object
Returns the value of attribute conn.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #authenticated? ⇒ Boolean
- #connected? ⇒ Boolean
-
#initialize(user, password) ⇒ Client
constructor
A new instance of Client.
Methods included from Request
Methods included from Project
#project, #projects, #vote, #votes
Methods included from Talk
#submitions, #vote_down, #vote_up
Methods included from Session
Methods included from User
#accepted, #add_friend, #friends, #reject_friend, #sessions, #user
Constructor Details
#initialize(user, password) ⇒ Client
Returns a new instance of Client.
15 16 17 18 |
# File 'lib/codebits.rb', line 15 def initialize(user, password) @username = user @password = password end |
Instance Attribute Details
#auth ⇒ Object
Returns the value of attribute auth.
12 13 14 |
# File 'lib/codebits.rb', line 12 def auth @auth end |
#conn ⇒ Object
Returns the value of attribute conn.
12 13 14 |
# File 'lib/codebits.rb', line 12 def conn @conn end |
#password ⇒ Object
Returns the value of attribute password.
12 13 14 |
# File 'lib/codebits.rb', line 12 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
12 13 14 |
# File 'lib/codebits.rb', line 12 def username @username end |
Instance Method Details
#authenticated? ⇒ Boolean
20 21 22 |
# File 'lib/codebits.rb', line 20 def authenticated? !auth.nil? end |
#connected? ⇒ Boolean
24 25 26 |
# File 'lib/codebits.rb', line 24 def connected? !conn.nil? end |