Module: Card::Set::Abstract::List
- Extended by:
- Card::Set
- Defined in:
- platypus/tmp/set/gem-defaults/mod031-layout/abstract/list.rb,
platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb,
platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list/events.rb,
platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list/html_views.rb,
platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list/other_views.rb
Overview
Set: Abstract (List)
Defined Under Namespace
Modules: Events, HtmlFormat, HtmlViews, OtherViews
Constant Summary
Constants included from Helpers
Helpers::SET_PATTERN_TEST_REGEXP
Constants included from Event::Api
Class Method Summary collapse
Instance Method Summary collapse
-
#count ⇒ Object
-
#diff_args ⇒ Object
-
#each_item_name_with_options(_content = nil) ⇒ Object
-
#item_references? ⇒ Boolean
for override if false, item names that match cardnames will NOT be treated like references to those cards.
-
#standardize_content(value) ⇒ Object
-
#swap_names(old_name, new_name) ⇒ 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/mod031-layout/abstract/list.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/mod/layout/set/abstract/list.rb"; end |
Instance Method Details
#count ⇒ Object
22 23 24 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 22 def count item_strings.size end |
#diff_args ⇒ Object
18 19 20 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 18 def diff_args { diff_format: :pointer } end |
#each_item_name_with_options(_content = nil) ⇒ Object
31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 31 def _content=nil item_names.each { |name| yield name, {} } end |
#item_references? ⇒ Boolean
for override if false, item names that match cardnames will NOT be treated like references to those cards
14 15 16 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 14 def item_references? true end |
#standardize_content(value) ⇒ Object
26 27 28 29 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 26 def standardize_content value value = item_strings(content: value) unless value.is_a? Array super value end |
#swap_names(old_name, new_name) ⇒ Object
35 36 37 38 39 40 41 42 43 |
# File 'platypus/tmp/set/gem-defaults/mod005-list/abstract/01_list.rb', line 35 def swap_names old_name, new_name item_strings.map do |string| if string.match?(/^[:~]/) string else string.to_name.swap old_name, new_name end end end |