Sha256: 81671a43696c78aa922e0d3e3e268afcf9a984af8e1ddd5d0ea9bb034054d58b
Contents?: true
Size: 899 Bytes
Versions: 1
Compression:
Stored size: 899 Bytes
Contents
module IronMotion class Project include EM::Eventable attr_reader :id attr_reader :name attr_reader :codes attr_reader :tasks def initialize(id) @id = id @name = "dokket" end def getCodes(&block) IronMotion::Code.all(@id) do |codes| @codes = codes block.call(codes) end end def getTasks(options=nil, &block) @tasks = IronMotion::Task.all(@id, options) do |tasks| @tasks = tasks block.call(tasks) end end def joinTasksAndCodes raise IronMotionError, "@codes not loaded" if @codes.nil? raise IronMotionError, "@tasks not loaded" if @tasks.nil? @tasks.map do |task| task.setCode @codes.select {|c| c.id == task.code_id}.first end @tasks end def self.all [IronMotion::Project.new("509c557b7e4b7117f2002bf6")] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
iron-motion-0.0.1 | motion/project.rb |