Module: Card::Set::Abstract::Search
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb,
platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/views.rb,
platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search/search_params.rb
Overview
Set: Abstract (Search)
Defined Under Namespace
Modules: Format, HtmlFormat, SearchParams, Views
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Class Method Summary collapse
Instance Method Summary collapse
-
#cached_search(args = {}) ⇒ Object
-
#count(args = {}) ⇒ Object
-
#each_item_name_with_options(_content = nil) ⇒ Object
for override def item_type_id nil end.
-
#item_cards(args = {}) ⇒ Object
-
#item_ids(args = {}) ⇒ Object
-
#item_names(args = {}) ⇒ Object
-
#returning(item, args) ⇒ Object
-
#search(_args = {}) ⇒ Object
Methods included from Card::Set
Methods included from I18nScope
Methods included from Registrar
#extended, #finalize_load, #process_base_modules, #register_set
Methods included from Helpers
#format_module, #format_modules, #method_missing, #modules, #pattern_code, #respond_to_missing?, #set_name_parts, #shortname, #underscored_name
Methods included from Card::Set::AdvancedApi
#assign_type, #attachment, #define_set_from_error, #ensure_set, #setting_opts, #stage_method
Methods included from Format
#before, #format, layout_method_name, #view, view_method_name, view_setting_method_name, wrapper_method_name
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
7 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/mod/search/set/abstract/0_search.rb"; end |
Instance Method Details
#cached_search(args = {}) ⇒ Object
14 15 16 17 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 14 def cached_search args={} @search_results ||= {} @search_results[args.to_s] ||= search args end |
#count(args = {}) ⇒ Object
39 40 41 42 43 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 39 def count args={} args[:offset] = 0 args[:limit] = 0 returning(:count, args) { search args } end |
#each_item_name_with_options(_content = nil) ⇒ Object
for override def item_type_id nil end
50 51 52 53 54 55 56 57 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 50 def _content=nil = {} item = fetch_query.statement[:view] [:view] = item if item item_names.each do |name| yield name, end end |
#item_cards(args = {}) ⇒ Object
24 25 26 27 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 24 def item_cards args={} args[:limit] ||= 0 returning(:card, args) { search args } end |
#item_ids(args = {}) ⇒ Object
34 35 36 37 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 34 def item_ids args={} args[:limit] ||= 0 returning(:id, args) { search args } end |
#item_names(args = {}) ⇒ Object
29 30 31 32 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 29 def item_names args={} args[:limit] ||= 0 returning(:name, args) { search args } end |
#returning(item, args) ⇒ Object
19 20 21 22 |
# File 'platypus/tmp/set/gem-defaults/mod009-search/abstract/0_search.rb', line 19 def returning item, args args[:return] = item yield end |