Class: Todoly::Project
- Inherits:
-
Object
- Object
- Todoly::Project
- Defined in:
- lib/todoly/project.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#raw ⇒ Object
readonly
Returns the value of attribute raw.
Class Method Summary collapse
Instance Method Summary collapse
- #[](key) ⇒ Object
- #done_tasks ⇒ Object
-
#initialize(rest_if, obj) ⇒ Project
constructor
A new instance of Project.
- #tasks ⇒ Object
Constructor Details
#initialize(rest_if, obj) ⇒ Project
Returns a new instance of Project.
13 14 15 16 17 18 |
# File 'lib/todoly/project.rb', line 13 def initialize(rest_if, obj) @rest_if = rest_if @raw = obj @id = obj["Id"] @name = obj["Content"] end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/todoly/project.rb', line 20 def id @id end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
20 21 22 |
# File 'lib/todoly/project.rb', line 20 def name @name end |
#raw ⇒ Object (readonly)
Returns the value of attribute raw.
20 21 22 |
# File 'lib/todoly/project.rb', line 20 def raw @raw end |
Class Method Details
.list(rest_if) ⇒ Object
7 8 9 10 11 |
# File 'lib/todoly/project.rb', line 7 def self.list(rest_if) rest_if.projects.map do |obj| self.new(rest_if, obj) end end |