Class: NCover::ReportFilterBase
- Inherits:
-
Object
- Object
- NCover::ReportFilterBase
- Includes:
- UpdateAttributes
- Defined in:
- lib/albacore/ncoverreports/reportfilterbase.rb
Direct Known Subclasses
AssemblyFilter, ClassFilter, DocumentFilter, MethodFilter, NamespaceFilter
Instance Attribute Summary collapse
-
#filter ⇒ Object
Returns the value of attribute filter.
-
#filter_type ⇒ Object
Returns the value of attribute filter_type.
-
#is_regex ⇒ Object
Returns the value of attribute is_regex.
-
#item_type ⇒ Object
Returns the value of attribute item_type.
Instance Method Summary collapse
- #get_filter_options ⇒ Object
-
#initialize(item_type, params = {}) ⇒ ReportFilterBase
constructor
A new instance of ReportFilterBase.
Methods included from UpdateAttributes
Constructor Details
#initialize(item_type, params = {}) ⇒ ReportFilterBase
Returns a new instance of ReportFilterBase.
9 10 11 12 13 14 15 16 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 9 def initialize(item_type, params={}) @filter = "" @item_type = item_type @is_regex = false @filter_type = :exclude update_attributes(params) unless params.nil? super() end |
Instance Attribute Details
#filter ⇒ Object
Returns the value of attribute filter.
7 8 9 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 7 def filter @filter end |
#filter_type ⇒ Object
Returns the value of attribute filter_type.
7 8 9 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 7 def filter_type @filter_type end |
#is_regex ⇒ Object
Returns the value of attribute is_regex.
7 8 9 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 7 def is_regex @is_regex end |
#item_type ⇒ Object
Returns the value of attribute item_type.
7 8 9 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 7 def item_type @item_type end |
Instance Method Details
#get_filter_options ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/albacore/ncoverreports/reportfilterbase.rb', line 18 def filter = "\"#{@filter}\"" filter << ":#{@item_type}" filter << ":#{@is_regex}" filter << ":#{(@filter_type == :include)}" filter end |