Class: Kennel::Filter
- Inherits:
-
Object
- Object
- Kennel::Filter
- Defined in:
- lib/kennel/filter.rb
Instance Attribute Summary collapse
-
#project_filter ⇒ Object
readonly
Returns the value of attribute project_filter.
-
#tracking_id_filter ⇒ Object
readonly
Returns the value of attribute tracking_id_filter.
Instance Method Summary collapse
- #filter_parts(parts) ⇒ Object
- #filter_projects(projects) ⇒ Object
-
#initialize ⇒ Filter
constructor
A new instance of Filter.
Constructor Details
#initialize ⇒ Filter
Returns a new instance of Filter.
7 8 9 10 11 |
# File 'lib/kennel/filter.rb', line 7 def initialize # build early so we fail fast on invalid user input @tracking_id_filter = build_tracking_id_filter @project_filter = build_project_filter end |
Instance Attribute Details
#project_filter ⇒ Object (readonly)
Returns the value of attribute project_filter.
5 6 7 |
# File 'lib/kennel/filter.rb', line 5 def project_filter @project_filter end |
#tracking_id_filter ⇒ Object (readonly)
Returns the value of attribute tracking_id_filter.
5 6 7 |
# File 'lib/kennel/filter.rb', line 5 def tracking_id_filter @tracking_id_filter end |
Instance Method Details
#filter_parts(parts) ⇒ Object
17 18 19 |
# File 'lib/kennel/filter.rb', line 17 def filter_parts(parts) filter_resources(parts, :tracking_id, tracking_id_filter, "resources", "TRACKING_ID") end |
#filter_projects(projects) ⇒ Object
13 14 15 |
# File 'lib/kennel/filter.rb', line 13 def filter_projects(projects) filter_resources(projects, :kennel_id, project_filter, "projects", "PROJECT") end |