Class: Decidim::DecidimAwesome::SpaceConstraintFinder
- Inherits:
-
Object
- Object
- Decidim::DecidimAwesome::SpaceConstraintFinder
- Defined in:
- app/queries/decidim/decidim_awesome/space_constraint_finder.rb
Instance Attribute Summary collapse
-
#config_var ⇒ Object
readonly
Returns the value of attribute config_var.
-
#participatory_space ⇒ Object
readonly
Returns the value of attribute participatory_space.
Instance Method Summary collapse
-
#initialize(config_var, participatory_space) ⇒ SpaceConstraintFinder
constructor
A new instance of SpaceConstraintFinder.
- #query ⇒ Object
Constructor Details
#initialize(config_var, participatory_space) ⇒ SpaceConstraintFinder
Returns a new instance of SpaceConstraintFinder.
6 7 8 9 |
# File 'app/queries/decidim/decidim_awesome/space_constraint_finder.rb', line 6 def initialize(config_var, participatory_space) @config_var = config_var @participatory_space = participatory_space end |
Instance Attribute Details
#config_var ⇒ Object (readonly)
Returns the value of attribute config_var.
11 12 13 |
# File 'app/queries/decidim/decidim_awesome/space_constraint_finder.rb', line 11 def config_var @config_var end |
#participatory_space ⇒ Object (readonly)
Returns the value of attribute participatory_space.
11 12 13 |
# File 'app/queries/decidim/decidim_awesome/space_constraint_finder.rb', line 11 def participatory_space @participatory_space end |
Instance Method Details
#query ⇒ Object
13 14 15 16 17 18 |
# File 'app/queries/decidim/decidim_awesome/space_constraint_finder.rb', line 13 def query return Decidim::DecidimAwesome::AwesomeConfig.none if participatory_space.nil? set_base_query add_space_specific_conditions end |