Added rdoc comments and using the Base class now

This commit is contained in:
Eric Davis
2008-06-11 09:20:22 -07:00
parent 8150cfcabc
commit 191221908d
4 changed files with 67 additions and 46 deletions
+8 -5
View File
@@ -1,7 +1,9 @@
require_dependency 'query'
# Patches Redmine's Queries dynamically, adding the Deliverable
# to the available query columns
module QueryPatch
def self.included(base)
def self.included(base) # :nodoc:
base.extend(ClassMethods)
base.send(:include, InstanceMethods)
@@ -18,20 +20,21 @@ module QueryPatch
end
module ClassMethods
def hello
puts 'hello'
end
# Setter for +available_columns+ that isn't provided by the core.
def available_columns=(v)
self.available_columns = (v)
end
# Method to add a column to the +available_columns+ that isn't provided by the core.
def add_available_column(column)
self.available_columns << (column)
end
end
module InstanceMethods
# Wrapper around the +available_filters+ to add a new Deliverable filter
def budget_available_filters
@available_filters = redmine_available_filters