Module: Card::Set
- Includes:
- AdvancedApi, Basket, Event, Format, Helpers, Inheritance, Trait
- Included in:
- Abstract::AceEditor, Abstract::Attachment, Abstract::Attachment::Paths, Abstract::Attachment::StorageType, Abstract::Attachment::UploadCache, Abstract::CodeFile, Abstract::CodePointer, Abstract::Machine, Abstract::MachineInput, Abstract::Permission, Abstract::Pointer, Abstract::Pointer::Edit, Abstract::ProsemirrorEditor, Abstract::Script, Abstract::SolidCache, All::Account, All::Actify, All::Actions, All::ActiveCard, All::AllCss, All::AllCsv, All::AllJs, All::Base, All::Bootstrap::Form, All::Bootstrap::Helper, All::Bootstrap::Table, All::Bootstrap::Tabs, All::Bootstrap::Wrapper, All::Collection, All::Comment, All::Content, All::ContentHistory, All::Debug, All::EmailHtml, All::EmailText, All::Erb, All::Error, All::Event, All::EventViz, All::Export, All::Fetch, All::File, All::FileUtils, All::Follow, All::Haml, All::History, All::Initialize, All::Json, All::Links, All::ListChanges, All::LocationHistory, All::Name, All::NameValidations, All::Notify, All::Observer, All::Pattern, All::Permissions, All::Phases, All::References, All::ResetMachines, All::RichBootstrap, All::RichHtml::Content, All::RichHtml::Editing, All::RichHtml::Form, All::RichHtml::Header, All::RichHtml::Menu, All::RichHtml::Modal, All::RichHtml::Toolbar, All::RichHtml::Wrapper, All::Rss, All::Rules, All::SolidCache, All::Stages, All::States, All::Subcards, All::Templating, All::Text, All::TrackedAttributes, All::Trash, All::Type, All::UpdateReadRules, All::Utils, All::ViewCache, All::ViewViz, Right::Account, Right::AddHelp, Right::Bcc, Right::Cc, Right::Comment, Right::Create, Right::Debug, Right::Default, Right::Delete, Right::Discussion, Right::Email, Right::Follow, Right::FollowFields, Right::Followers, Right::Following, Right::From, Right::Help, Right::HtmlMessage, Right::MachineCache, Right::MachineInput, Right::MachineOutput, Right::Password, Right::Read, Right::Salt, Right::Script, Right::SolidCache, Right::Status, Right::Structure, Right::Style, Right::To, Right::Token, Right::Update, Right::WhenCreated, Right::WhenLastEdited, Rstar::Rules, Rstar::RulesEditor, Self::AccountLinks, Self::Accountable, Self::AddHelp, Self::Admin, Self::AdminInfo, Self::Alerts, Self::Always, Self::Autoname, Self::BootstrapCards, Self::BootstrapJs, Self::BootswatchShared, Self::Captcha, Self::Codenames, Self::Create, Self::Created, Self::Default, Self::DefaultHtmlView, Self::Delete, Self::Edited, Self::Follow, Self::FollowDefaults, Self::FollowFields, Self::Foot, Self::Head, Self::Head::Javascript, Self::Help, Self::Input, Self::Layout, Self::Navbox, Self::Never, Self::Now, Self::OnCreate, Self::OnDelete, Self::OnUpdate, Self::Options, Self::OptionsLabel, Self::Read, Self::Recent, Self::RecentSettings, Self::Script, Self::ScriptAce, Self::ScriptAceConfig, Self::ScriptCardMenu, Self::ScriptEditors, Self::ScriptHtml5shivPrintshiv, Self::ScriptJquery, Self::ScriptJqueryHelper, Self::ScriptMods, Self::ScriptPointerConfig, Self::ScriptProsemirror, Self::ScriptProsemirrorConfig, Self::ScriptSlot, Self::Search, Self::Signin, Self::SmartmenuCss, Self::SmartmenuJs, Self::Structure, Self::Style, Self::StyleBootstrapCompatible, Self::StyleCards, Self::StyleJqueryUiSmoothness, Self::TableOfContents, Self::Thanks, Self::Update, Self::Version, Type::Basic, Type::Cardtype, Type::CoffeeScript, Type::Css, Type::Date, Type::EmailTemplate, Type::File, Type::Html, Type::Image, Type::JavaScript, Type::LayoutType, Type::List, Type::ListedBy, Type::Number, Type::Phrase, Type::PlainText, Type::Pointer, Type::Scss, Type::SearchType, Type::Session, Type::Set, Type::Setting, Type::Signup, Type::Skin, Type::Toggle, Type::Uri, Type::User, TypePlusRight::User::Follow
- Defined in:
- lib/card/set.rb,
lib/card/set/event.rb,
lib/card/set/trait.rb,
lib/card/set/basket.rb,
lib/card/set/format.rb,
lib/card/set/loader.rb,
lib/card/set/helpers.rb,
lib/card/set_pattern.rb,
lib/card/set/i18n_scope.rb,
lib/card/set/inheritance.rb,
lib/card/set/advanced_api.rb,
lib/card/set/i18n_scanner.rb,
lib/card/set/format/haml_views.rb,
lib/card/set/event/delayed_event.rb,
tmpsets/set/mod002-core/all/erb.rb,
tmpsets/set/mod002-core/all/haml.rb,
tmpsets/set/mod002-core/all/name.rb,
tmpsets/set/mod002-core/all/type.rb,
tmpsets/set/mod002-core/all/debug.rb,
tmpsets/set/mod002-core/all/event.rb,
tmpsets/set/mod002-core/all/fetch.rb,
tmpsets/set/mod002-core/all/rules.rb,
tmpsets/set/mod002-core/all/trash.rb,
tmpsets/set/mod002-core/all/utils.rb,
tmpsets/set/mod013-email/right/cc.rb,
tmpsets/set/mod013-email/right/to.rb,
tmpsets/set/mod002-core/all/actify.rb,
tmpsets/set/mod002-core/all/export.rb,
tmpsets/set/mod002-core/all/phases.rb,
tmpsets/set/mod002-core/all/stages.rb,
tmpsets/set/mod002-core/all/states.rb,
tmpsets/set/mod013-email/right/bcc.rb,
tmpsets/set/mod001-admin/self/admin.rb,
tmpsets/set/mod002-core/all/content.rb,
tmpsets/set/mod002-core/all/pattern.rb,
tmpsets/set/mod013-email/all/follow.rb,
tmpsets/set/mod013-email/all/notify.rb,
tmpsets/set/mod013-email/right/from.rb,
tmpsets/set/mod013-email/self/never.rb,
tmpsets/set/mod002-core/all/subcards.rb,
tmpsets/set/mod011-machines/type/css.rb,
tmpsets/set/mod013-email/self/always.rb,
tmpsets/set/mod013-email/self/edited.rb,
tmpsets/set/mod013-email/self/follow.rb,
tmpsets/set/mod016-standard/self/now.rb,
tmpsets/set/mod016-standard/type/set.rb,
tmpsets/set/mod016-standard/type/uri.rb,
tmpsets/set/mod017-account/type/user.rb,
tmpsets/set/mod001-admin/self/version.rb,
tmpsets/set/mod011-machines/type/scss.rb,
tmpsets/set/mod011-machines/type/skin.rb,
tmpsets/set/mod012-settings/self/help.rb,
tmpsets/set/mod012-settings/self/read.rb,
tmpsets/set/mod013-email/all/observer.rb,
tmpsets/set/mod013-email/right/follow.rb,
tmpsets/set/mod013-email/self/created.rb,
tmpsets/set/mod016-standard/all/error.rb,
tmpsets/set/mod016-standard/all/links.rb,
tmpsets/set/mod016-standard/self/foot.rb,
tmpsets/set/mod016-standard/type/date.rb,
tmpsets/set/mod016-standard/type/list.rb,
tmpsets/set/mod017-account/right/salt.rb,
tmpsets/set/mod002-core/all/collection.rb,
tmpsets/set/mod002-core/all/initialize.rb,
tmpsets/set/mod002-core/all/references.rb,
tmpsets/set/mod002-core/all/templating.rb,
tmpsets/set/mod002-core/all/view_cache.rb,
tmpsets/set/mod003-history/all/actions.rb,
tmpsets/set/mod003-history/all/history.rb,
tmpsets/set/mod012-settings/right/help.rb,
tmpsets/set/mod012-settings/right/read.rb,
tmpsets/set/mod012-settings/self/input.rb,
tmpsets/set/mod012-settings/self/style.rb,
tmpsets/set/mod016-standard/type/basic.rb,
tmpsets/set/mod017-account/all/account.rb,
tmpsets/set/mod017-account/right/email.rb,
tmpsets/set/mod017-account/right/token.rb,
tmpsets/set/mod017-account/self/signin.rb,
tmpsets/set/mod017-account/type/signup.rb,
tmpsets/set/mod002-core/all/active_card.rb,
tmpsets/set/mod002-core/all/permissions.rb,
tmpsets/set/mod005-pointer/type/pointer.rb,
tmpsets/set/mod012-settings/right/style.rb,
tmpsets/set/mod012-settings/self/create.rb,
tmpsets/set/mod012-settings/self/delete.rb,
tmpsets/set/mod012-settings/self/layout.rb,
tmpsets/set/mod012-settings/self/script.rb,
tmpsets/set/mod012-settings/self/thanks.rb,
tmpsets/set/mod012-settings/self/update.rb,
tmpsets/set/mod013-email/all/email_html.rb,
tmpsets/set/mod013-email/all/email_text.rb,
tmpsets/set/mod016-standard/all/comment.rb,
tmpsets/set/mod016-standard/rstar/rules.rb,
tmpsets/set/mod016-standard/self/alerts.rb,
tmpsets/set/mod016-standard/self/navbox.rb,
tmpsets/set/mod016-standard/self/recent.rb,
tmpsets/set/mod016-standard/self/search.rb,
tmpsets/set/mod016-standard/type/number.rb,
tmpsets/set/mod016-standard/type/phrase.rb,
tmpsets/set/mod016-standard/type/toggle.rb,
tmpsets/set/mod017-account/right/status.rb,
tmpsets/set/mod001-admin/self/admin_info.rb,
tmpsets/set/mod004-basic_formats/all/rss.rb,
tmpsets/set/mod010-basic_types/type/html.rb,
tmpsets/set/mod012-settings/right/create.rb,
tmpsets/set/mod012-settings/right/delete.rb,
tmpsets/set/mod012-settings/right/script.rb,
tmpsets/set/mod012-settings/right/update.rb,
tmpsets/set/mod012-settings/self/captcha.rb,
tmpsets/set/mod012-settings/self/default.rb,
tmpsets/set/mod012-settings/self/options.rb,
tmpsets/set/mod012-settings/type/setting.rb,
tmpsets/set/mod013-email/right/followers.rb,
tmpsets/set/mod013-email/right/following.rb,
tmpsets/set/mod014-developer/right/debug.rb,
tmpsets/set/mod015-carrierwave/type/file.rb,
tmpsets/set/mod016-standard/type/session.rb,
tmpsets/set/mod017-account/right/account.rb,
tmpsets/set/mod004-basic_formats/all/base.rb,
tmpsets/set/mod004-basic_formats/all/file.rb,
tmpsets/set/mod004-basic_formats/all/json.rb,
tmpsets/set/mod004-basic_formats/all/text.rb,
tmpsets/set/mod012-settings/right/comment.rb,
tmpsets/set/mod012-settings/right/default.rb,
tmpsets/set/mod012-settings/self/add_help.rb,
tmpsets/set/mod012-settings/self/autoname.rb,
tmpsets/set/mod014-developer/all/view_viz.rb,
tmpsets/set/mod015-carrierwave/self/admin.rb,
tmpsets/set/mod015-carrierwave/type/image.rb,
tmpsets/set/mod016-standard/type/cardtype.rb,
tmpsets/set/mod017-account/right/password.rb,
tmpsets/set/mod002-core/abstract/code_file.rb,
tmpsets/set/mod004-basic_formats/self/head.rb,
tmpsets/set/mod012-settings/right/add_help.rb,
tmpsets/set/mod012-settings/self/on_create.rb,
tmpsets/set/mod012-settings/self/on_delete.rb,
tmpsets/set/mod012-settings/self/on_update.rb,
tmpsets/set/mod012-settings/self/structure.rb,
tmpsets/set/mod014-developer/all/event_viz.rb,
tmpsets/set/mod016-standard/self/codenames.rb,
tmpsets/set/mod016-standard/type/listed_by.rb,
tmpsets/set/mod004-basic_formats/all/all_js.rb,
tmpsets/set/mod005-pointer/self/script_mods.rb,
tmpsets/set/mod011-machines/abstract/script.rb,
tmpsets/set/mod012-settings/right/structure.rb,
tmpsets/set/mod013-email/right/html_message.rb,
tmpsets/set/mod002-core/all/location_history.rb,
tmpsets/set/mod002-core/all/name_validations.rb,
tmpsets/set/mod004-basic_formats/all/all_css.rb,
tmpsets/set/mod004-basic_formats/all/all_csv.rb,
tmpsets/set/mod011-machines/abstract/machine.rb,
tmpsets/set/mod011-machines/self/script_slot.rb,
tmpsets/set/mod011-machines/self/style_cards.rb,
tmpsets/set/mod011-machines/type/java_script.rb,
tmpsets/set/mod012-settings/self/accountable.rb,
tmpsets/set/mod013-email/right/follow_fields.rb,
tmpsets/set/mod013-email/type/email_template.rb,
tmpsets/set/mod016-standard/all/list_changes.rb,
tmpsets/set/mod016-standard/right/discussion.rb,
tmpsets/set/mod016-standard/type/layout_type.rb,
tmpsets/set/mod016-standard/type/search_type.rb,
tmpsets/set/mod002-core/all/update_read_rules.rb,
tmpsets/set/mod006-ace_editor/self/script_ace.rb,
tmpsets/set/mod013-email/self/follow_defaults.rb,
tmpsets/set/mod015-carrierwave/all/file_utils.rb,
tmpsets/set/mod017-account/self/account_links.rb,
tmpsets/set/mod018-bootstrap/self/script_mods.rb,
tmpsets/set/mod002-core/all/tracked_attributes.rb,
tmpsets/set/mod003-history/all/content_history.rb,
tmpsets/set/mod005-pointer/abstract/01_pointer.rb,
tmpsets/set/mod005-pointer/self/script_editors.rb,
tmpsets/set/mod009-solid_cache/all/solid_cache.rb,
tmpsets/set/mod010-basic_types/type/plain_text.rb,
tmpsets/set/mod011-machines/all/reset_machines.rb,
tmpsets/set/mod011-machines/self/script_jquery.rb,
tmpsets/set/mod011-machines/type/coffee_script.rb,
tmpsets/set/mod012-settings/self/follow_fields.rb,
tmpsets/set/mod012-settings/self/options_label.rb,
tmpsets/set/mod016-standard/all/rich_html/form.rb,
tmpsets/set/mod016-standard/all/rich_html/menu.rb,
tmpsets/set/mod016-standard/right/when_created.rb,
tmpsets/set/mod016-standard/rstar/rules_editor.rb,
tmpsets/set/mod018-bootstrap/self/bootstrap_js.rb,
tmpsets/set/mod018-bootstrap/self/smartmenu_js.rb,
tmpsets/set/mod011-machines/right/machine_cache.rb,
tmpsets/set/mod011-machines/right/machine_input.rb,
tmpsets/set/mod012-settings/abstract/permission.rb,
tmpsets/set/mod016-standard/all/rich_html/modal.rb,
tmpsets/set/mod018-bootstrap/all/bootstrap/form.rb,
tmpsets/set/mod018-bootstrap/all/bootstrap/tabs.rb,
tmpsets/set/mod018-bootstrap/all/rich_bootstrap.rb,
tmpsets/set/mod018-bootstrap/self/smartmenu_css.rb,
tmpsets/set/mod005-pointer/abstract/code_pointer.rb,
tmpsets/set/mod009-solid_cache/right/solid_cache.rb,
tmpsets/set/mod011-machines/right/machine_output.rb,
tmpsets/set/mod012-settings/self/recent_settings.rb,
tmpsets/set/mod016-standard/all/rich_html/header.rb,
tmpsets/set/mod018-bootstrap/all/bootstrap/table.rb,
tmpsets/set/mod006-ace_editor/abstract/ace_editor.rb,
tmpsets/set/mod011-machines/self/script_card_menu.rb,
tmpsets/set/mod016-standard/all/rich_html/content.rb,
tmpsets/set/mod016-standard/all/rich_html/editing.rb,
tmpsets/set/mod016-standard/all/rich_html/toolbar.rb,
tmpsets/set/mod016-standard/all/rich_html/wrapper.rb,
tmpsets/set/mod018-bootstrap/all/bootstrap/helper.rb,
tmpsets/set/mod018-bootstrap/self/bootstrap_cards.rb,
tmpsets/set/mod011-machines/abstract/machine_input.rb,
tmpsets/set/mod012-settings/self/default_html_view.rb,
tmpsets/set/mod012-settings/self/table_of_contents.rb,
tmpsets/set/mod015-carrierwave/abstract/attachment.rb,
tmpsets/set/mod016-standard/right/when_last_edited.rb,
tmpsets/set/mod018-bootstrap/all/bootstrap/wrapper.rb,
tmpsets/set/mod005-pointer/abstract/01_pointer/edit.rb,
tmpsets/set/mod009-solid_cache/abstract/solid_cache.rb,
tmpsets/set/mod018-bootstrap/self/bootswatch_shared.rb,
tmpsets/set/mod006-ace_editor/self/script_ace_config.rb,
tmpsets/set/mod013-email/type_plus_right/user/follow.rb,
tmpsets/set/mod005-pointer/self/script_pointer_config.rb,
tmpsets/set/mod011-machines/self/script_jquery_helper.rb,
tmpsets/set/mod004-basic_formats/self/01_head/javascript.rb,
tmpsets/set/mod015-carrierwave/abstract/attachment/paths.rb,
tmpsets/set/mod011-machines/self/script_html5shiv_printshiv.rb,
tmpsets/set/mod011-machines/self/style_bootstrap_compatible.rb,
tmpsets/set/mod011-machines/self/style_jquery_ui_smoothness.rb,
tmpsets/set/mod007-prosemirror_editor/self/script_prosemirror.rb,
tmpsets/set/mod015-carrierwave/abstract/attachment/storage_type.rb,
tmpsets/set/mod015-carrierwave/abstract/attachment/upload_cache.rb,
tmpsets/set/mod007-prosemirror_editor/abstract/prosemirror_editor.rb,
tmpsets/set/mod007-prosemirror_editor/self/script_prosemirror_config.rb
Overview
A Set is a group of Cards to which Rules may apply. Sets can be as specific as a single card, as general as all cards, or anywhere in between.
Rules can defined onto Sets in two ways:
- Card rules are defined in card content. These are generally configured via the web interface and are thus documented at http://wagn.org/rules.
- Code rules can be defined in a 'set module'.
The Mod docs explain how to create mods and set_modules. This page explains how those modules become useful.
Suppose you have created a "mod" for managing your contacts called "contactmanager", and it includes code that would apply to all +address cards here:
./contactmanager/set/right/address.rb
Then, whenever you fetch or instantiate a +address card, the card will automatically include code from that set module. In fact, it will include all the set modules associated with sets of which it is a member.
For example, say you have a Plaintext card named 'Philipp+address', and you have set files for the following sets:
* all cards
* all Plaintext cards
* all cards ending in +address
When you run this:
mycard = Card.fetch 'Philipp+address'
...then mycard will include the set modules associated with each of those sets in the above order.
Note that the set module's filename connects it to the set, so both the set_pattern and the set_anchor must correspond to the codename of a card in the database to function correctly.
A set module is "just ruby", but is generally quite concise because Card a) uses its the set module's file location to autogenerate ruby module names and b) then uses Card::Set module to provide API for the most common set methods.
Defined Under Namespace
Modules: AdvancedApi, Basket, Event, Format, Helpers, I18nScope, Inheritance, Loader, Trait Classes: Abstract, All, AllPlus, I18nScanner, Pattern, Right, Rstar, Self, Star, Type, TypePlusRight
Constant Summary
Constants included from Format
Constants included from Event::DelayedEvent
Event::DelayedEvent::DELAY_STAGES
Method Summary
Methods included from I18nScope
Methods included from Loader
clean_empty_module_from_hash, clean_empty_modules, extended, process_base_modules, register_set
Methods included from Helpers
#abstract_set?, #all_set?, #num_set_parts, #shortname
Methods included from AdvancedApi
#attachment, #ensure_set, #stage_method
Methods included from Format
#all_set_format_mod!, #define_on_format, #format, #register_set_format, #view
Methods included from Inheritance
#include_set, #include_set_formats
Methods included from Basket
#abstract_basket, #add_to_basket, #basket
Methods included from Trait
#card_accessor, #card_reader, #card_writer