Sha256: 82a68dba5c042202ea46a4e411aa7f4d27db489c025828bbc745767c1cf6975a
Contents?: true
Size: 589 Bytes
Versions: 1
Compression:
Stored size: 589 Bytes
Contents
require "todoly/task" class Todoly class Project def self.list(rest_if) rest_if.projects.map do |obj| self.new(rest_if, obj) end end def initialize(rest_if, obj) @rest_if = rest_if @raw = obj @id = obj["Id"] @name = obj["Content"] end attr_reader :raw, :id, :name def tasks @rest_if.items_of_project(@id).map do |item| Task.new(@rest_if, item) end end def done_tasks @rest_if.done_items_of_project(@id).map do |item| Task.new(@rest_if, item) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
todoly-0.0.1 | lib/todoly/project.rb |