Class: Mingle4r::MingleClient
- Inherits:
-
Object
- Object
- Mingle4r::MingleClient
- Defined in:
- lib/mingle4r/mingle_client.rb
Instance Attribute Summary collapse
-
#password ⇒ Object
Returns the value of attribute password.
-
#proj_id ⇒ Object
Returns the value of attribute proj_id.
-
#site ⇒ Object
Returns the value of attribute site.
-
#user ⇒ Object
Returns the value of attribute user.
Instance Method Summary collapse
- #cards ⇒ Object
-
#initialize(site, user, password, proj_id = nil) ⇒ MingleClient
constructor
A new instance of MingleClient.
- #project ⇒ Object
- #projects ⇒ Object
- #users ⇒ Object
- #valid_credentials? ⇒ Boolean
Constructor Details
#initialize(site, user, password, proj_id = nil) ⇒ MingleClient
Returns a new instance of MingleClient.
5 6 7 8 9 10 11 |
# File 'lib/mingle4r/mingle_client.rb', line 5 def initialize(site, user, password, proj_id = nil) @site = site @user = user @password = password @proj_id = proj_id set_resource_attributes() end |
Instance Attribute Details
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/mingle4r/mingle_client.rb', line 3 def password @password end |
#proj_id ⇒ Object
Returns the value of attribute proj_id.
3 4 5 |
# File 'lib/mingle4r/mingle_client.rb', line 3 def proj_id @proj_id end |
#site ⇒ Object
Returns the value of attribute site.
3 4 5 |
# File 'lib/mingle4r/mingle_client.rb', line 3 def site @site end |
#user ⇒ Object
Returns the value of attribute user.
3 4 5 |
# File 'lib/mingle4r/mingle_client.rb', line 3 def user @user end |
Instance Method Details
#cards ⇒ Object
70 71 72 73 74 |
# File 'lib/mingle4r/mingle_client.rb', line 70 def cards raise 'proj_id attribute not set' unless @proj_id @project = Mingle4r::Project.find(@proj_id) unless(@project && (@proj_id == @project.identifier)) @project.cards end |
#project ⇒ Object
60 61 62 63 64 |
# File 'lib/mingle4r/mingle_client.rb', line 60 def project raise 'proj_id attribute not set' unless @proj_id @project = Mingle4r::Project.find(@proj_id) unless(@project && (@proj_id == @project.identifier)) @project end |
#projects ⇒ Object
66 67 68 |
# File 'lib/mingle4r/mingle_client.rb', line 66 def projects Mingle4r::Project.find(:all) end |