Class: AOJ::Credential
- Inherits:
-
Object
- Object
- AOJ::Credential
- Defined in:
- lib/aoj/credential.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/aoj/credential.rb', line 3 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/aoj/credential.rb', line 3 def username @username end |
Class Method Details
.get ⇒ Object
9 10 11 12 13 14 |
# File 'lib/aoj/credential.rb', line 9 def self.get Credential.new.tap do |c| c.username = AOJ::Conf.instance['username'] c.password = AOJ::Conf.instance['password'] end end |
Instance Method Details
#valid? ⇒ Boolean
5 6 7 |
# File 'lib/aoj/credential.rb', line 5 def valid? AOJ::API.loginable?(self) end |