Class: Durt::Project
Constant Summary
Configurable::STORE_FILE_NAME, Configurable::STORE_FILE_PATH
Class Method Summary
collapse
Instance Method Summary
collapse
#config, #config!, #config?, #config_store
#active!
Class Method Details
.current_project ⇒ Object
11
12
13
|
# File 'lib/durt/project.rb', line 11
def self.current_project
@current_project ||= find_by!(active: true)
end
|
Instance Method Details
#active_issue ⇒ Object
42
43
44
|
# File 'lib/durt/project.rb', line 42
def active_issue
issues.find_by!(active: true)
end
|
#bug_tracker_plugins ⇒ Object
26
27
28
|
# File 'lib/durt/project.rb', line 26
def bug_tracker_plugins
plugins.find_all { |p| p.bug_tracker.active? }
end
|
#config_key ⇒ Object
34
35
36
|
# File 'lib/durt/project.rb', line 34
def config_key
name
end
|
#plugins ⇒ Object
19
20
21
22
23
24
|
# File 'lib/durt/project.rb', line 19
def plugins
@plugins ||=
config['plugins'].map do |plugin_name, plugin_config|
Durt::Plugin.find_by_plugin_name(plugin_name).new(self, plugin_config)
end
end
|
#puts_stats ⇒ Object
38
39
40
|
# File 'lib/durt/project.rb', line 38
def puts_stats
issues.each(&:puts_stats)
end
|
#time_tracker_plugins ⇒ Object
30
31
32
|
# File 'lib/durt/project.rb', line 30
def time_tracker_plugins
plugins.find_all { |p| p.time_tracker.active? }
end
|
#to_s ⇒ Object
15
16
17
|
# File 'lib/durt/project.rb', line 15
def to_s
name
end
|