Class: Client
- Inherits:
-
Object
- Object
- Client
- Defined in:
- lib/client.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#tasks ⇒ Object
Returns the value of attribute tasks.
-
#top_task ⇒ Object
Returns the value of attribute top_task.
Instance Method Summary collapse
- #add_task(task_description) ⇒ Object
-
#initialize(name) ⇒ Client
constructor
A new instance of Client.
Constructor Details
#initialize(name) ⇒ Client
Returns a new instance of Client.
4 5 6 7 8 |
# File 'lib/client.rb', line 4 def initialize(name) @name = name @tasks = [] @top_task = top_task end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/client.rb', line 2 def name @name end |
#tasks ⇒ Object
Returns the value of attribute tasks.
2 3 4 |
# File 'lib/client.rb', line 2 def tasks @tasks end |
#top_task ⇒ Object
Returns the value of attribute top_task.
2 3 4 |
# File 'lib/client.rb', line 2 def top_task @top_task end |
Instance Method Details
#add_task(task_description) ⇒ Object
10 11 12 |
# File 'lib/client.rb', line 10 def add_task(task_description) tasks << task_description end |