Added rdoc comments and using the Base class now
This commit is contained in:
+8
-5
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user