Class: Card::Set::Type
- Inherits:
-
Pattern::Abstract
- Object
- Pattern::Abstract
- Card::Set::Type
show all
- Defined in:
- tmpsets/set_pattern/102-type.rb,
lib/card/set/type.rb,
tmpsets/set/mod022-rules/type/set.rb,
tmpsets/set/mod024-date/type/date.rb,
tmpsets/set/mod017-follow/type/set.rb,
tmpsets/set/mod017-follow/type/user.rb,
tmpsets/set/mod014-machines/type/css.rb,
tmpsets/set/mod021-standard/type/uri.rb,
tmpsets/set/mod025-account/type/user.rb,
tmpsets/set/mod014-machines/type/scss.rb,
tmpsets/set/mod014-machines/type/skin.rb,
tmpsets/set/mod021-standard/type/list.rb,
tmpsets/set/mod021-standard/type/basic.rb,
tmpsets/set/mod025-account/type/signup.rb,
tmpsets/set/mod008-pointer/type/pointer.rb,
tmpsets/set/mod017-follow/type/cardtype.rb,
tmpsets/set/mod021-standard/type/number.rb,
tmpsets/set/mod021-standard/type/phrase.rb,
tmpsets/set/mod021-standard/type/toggle.rb,
tmpsets/set/mod013-basic_types/type/html.rb,
tmpsets/set/mod013-basic_types/type/json.rb,
tmpsets/set/mod015-settings/type/setting.rb,
tmpsets/set/mod019-carrierwave/type/file.rb,
tmpsets/set/mod021-standard/type/session.rb,
tmpsets/set/mod019-carrierwave/type/image.rb,
tmpsets/set/mod021-standard/type/cardtype.rb,
tmpsets/set/mod020-search/type/search_type.rb,
tmpsets/set/mod021-standard/type/listed_by.rb,
tmpsets/set/mod014-machines/type/java_script.rb,
tmpsets/set/mod016-email/type/email_template.rb,
tmpsets/set/mod021-standard/type/layout_type.rb,
tmpsets/set/mod022-rules/type/set/html_views.rb,
tmpsets/set/mod013-basic_types/type/plain_text.rb,
tmpsets/set/mod014-machines/type/coffee_script.rb,
tmpsets/set/mod022-rules/type/set/rules_filter.rb,
tmpsets/set/mod022-rules/type/set/setting_lists.rb,
tmpsets/set/mod026-bootstrap/type/bootswatch_skin.rb,
tmpsets/set/mod022-rules/type/set/html_views/template.rb,
tmpsets/set/mod021-standard/type/notification_template.rb,
tmpsets/set/mod022-rules/type/set/html_views/nest_rules.rb,
tmpsets/set/mod016-email/type/email_template/email_config.rb,
tmpsets/set/mod022-rules/type/set/html_views/rules_bridge.rb,
tmpsets/set/mod026-bootstrap/type/customized_bootswatch_skin.rb,
tmpsets/set/mod026-bootstrap/type/customized_bootswatch_skin/html_views.rb
Overview
Defined Under Namespace
Modules: Basic, BootswatchSkin, Cardtype, CoffeeScript, Css, CustomizedBootswatchSkin, Date, EmailTemplate, File, Html, Image, JavaScript, Json, LayoutType, List, ListedBy, NotificationTemplate, Number, Phrase, PlainText, Pointer, Scss, SearchType, Session, Set, Setting, Signup, Skin, Toggle, Uri, User
Class Method Summary
collapse
Instance Method Summary
collapse
Constructor Details
#initialize(card) ⇒ Type
Returns a new instance of Type.
4
5
6
7
8
|
# File 'lib/card/set/type.rb', line 4
def initialize card
super
@inherit_card = card unless module_key
end
|
Class Method Details
.anchor_id(card) ⇒ Object
27
28
29
|
# File 'tmpsets/set_pattern/102-type.rb', line 27
def anchor_id card
card.type_id
end
|
.anchor_name(card) ⇒ Object
23
24
25
|
# File 'tmpsets/set_pattern/102-type.rb', line 23
def anchor_name card
card.type_name
end
|
.label(name) ⇒ Object
7
8
9
|
# File 'tmpsets/set_pattern/102-type.rb', line 7
def label name
%(All "#{name}" cards)
end
|
.pattern_applies?(card) ⇒ Boolean
19
20
21
|
# File 'tmpsets/set_pattern/102-type.rb', line 19
def pattern_applies? card
!!card.type_id
end
|
.prototype_args(anchor) ⇒ Object
15
16
17
|
# File 'tmpsets/set_pattern/102-type.rb', line 15
def prototype_args anchor
{ type: anchor }
end
|
.short_label(name) ⇒ Object
11
12
13
|
# File 'tmpsets/set_pattern/102-type.rb', line 11
def short_label name
%(all "#{name}s")
end
|
Instance Method Details
#lookup_module_list(modules_hash) ⇒ Object
10
11
12
13
|
# File 'lib/card/set/type.rb', line 10
def lookup_module_list modules_hash
lookup_key = module_key || inherited_key
modules_hash[lookup_key] if lookup_key
end
|