Class: Rules::Search

Inherits:
Rule
  • Object
show all
Defined in:
lib/question_chain/models/rules/search.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Rule

#ui_object_id

Class Method Details

.attributes_for_apiObject



14
15
16
# File 'lib/question_chain/models/rules/search.rb', line 14

def self.attributes_for_api
  %w(id fire_value _type ui_object_id negate_value)
end

Instance Method Details

#fire!(value = nil, ui_objects_hash = {}) ⇒ Object



4
5
6
7
# File 'lib/question_chain/models/rules/search.rb', line 4

def fire!(value = nil, ui_objects_hash = {})
  # does not matter what the value is in this instance
  # it is used to get opions for the drop_down_target
end

#get_options(filter, relatable_category_names = []) ⇒ Object

ask the parent document to get the options



10
11
12
# File 'lib/question_chain/models/rules/search.rb', line 10

def get_options(filter, relatable_category_names = [])
  _parent_document.options(filter, relatable_category_names)
end