Class: TaskMapper::Provider::Tester::Project

Inherits:
Base::Project
  • Object
show all
Defined in:
lib/taskmapper/tester/project.rb

Overview

This is the Project class for the Tester provider

Constant Summary

Constants inherited from Base::Project

Base::Project::API

Instance Attribute Summary

Attributes inherited from Base::Project

#system, #system_data

Instance Method Summary collapse

Methods inherited from Base::Project

find, find_by_attributes, find_by_id, first, last, search, #ticket, #ticket!, #tickets

Methods included from Helper

#easy_finder, #filter_string, #provider_parent, #search_by_attribute, #search_filter, #this_method

Methods included from Common

#destroy, included, #respond_to?, #save, #update!

Constructor Details

#initialize(*options) ⇒ Project

You should define @system and @system_data here. The data stuff is just to initialize fake data. In a real provider, you would use the API to grab the information and then initialize based on that info.



10
11
12
13
14
15
# File 'lib/taskmapper/tester/project.rb', line 10

def initialize(*options)
  data = {:id => rand(1000).to_i, :name => 'Tester', :description => 'Mock!-ing Bird',
    :created_at => Time.now, :updated_at => Time.now}
  @system = :tester
  super(data.merge(options.first || {}))
end