Class: Card::Set::Type
- Inherits:
-
Pattern::Abstract
show all
- Defined in:
- lib/card/set_pattern.rb,
tmpsets/set_pattern/102-type.rb,
tmpsets/set/mod011-machines/type/css.rb,
tmpsets/set/mod016-standard/type/set.rb,
tmpsets/set/mod016-standard/type/uri.rb,
tmpsets/set/mod017-account/type/user.rb,
tmpsets/set/mod011-machines/type/scss.rb,
tmpsets/set/mod011-machines/type/skin.rb,
tmpsets/set/mod016-standard/type/date.rb,
tmpsets/set/mod016-standard/type/list.rb,
tmpsets/set/mod016-standard/type/basic.rb,
tmpsets/set/mod017-account/type/signup.rb,
tmpsets/set/mod005-pointer/type/pointer.rb,
tmpsets/set/mod016-standard/type/number.rb,
tmpsets/set/mod016-standard/type/phrase.rb,
tmpsets/set/mod016-standard/type/toggle.rb,
tmpsets/set/mod010-basic_types/type/html.rb,
tmpsets/set/mod012-settings/type/setting.rb,
tmpsets/set/mod015-carrierwave/type/file.rb,
tmpsets/set/mod016-standard/type/session.rb,
tmpsets/set/mod015-carrierwave/type/image.rb,
tmpsets/set/mod016-standard/type/cardtype.rb,
tmpsets/set/mod016-standard/type/listed_by.rb,
tmpsets/set/mod011-machines/type/java_script.rb,
tmpsets/set/mod013-email/type/email_template.rb,
tmpsets/set/mod016-standard/type/layout_type.rb,
tmpsets/set/mod016-standard/type/search_type.rb,
tmpsets/set/mod010-basic_types/type/plain_text.rb,
tmpsets/set/mod011-machines/type/coffee_script.rb
Defined Under Namespace
Modules: Basic, Cardtype, CoffeeScript, Css, Date, EmailTemplate, File, Html, Image, JavaScript, LayoutType, List, ListedBy, Number, Phrase, PlainText, Pointer, Scss, SearchType, Session, Set, Setting, Signup, Skin, Toggle, Uri, User
Class Method Summary
collapse
Instance Method Summary
collapse
#anchor_codenames, #anchor_parts, #anchor_parts_count, anchorless?, #find_anchor_id, #format_module_list, #inspect, junction_only?, module_key, #module_key, #module_list, new, pattern, #pattern, register, #rule_set_key, #safe_key, #to_s
Constructor Details
#initialize(card) ⇒ Type
Returns a new instance of Type.
166
167
168
169
170
|
# File 'lib/card/set_pattern.rb', line 166
def initialize card
super
@inherit_card = card unless module_key
end
|
Class Method Details
.anchor_id(card) ⇒ Object
23
24
25
|
# File 'tmpsets/set_pattern/102-type.rb', line 23
def anchor_id card
card.type_id
end
|
.anchor_name(card) ⇒ Object
19
20
21
|
# File 'tmpsets/set_pattern/102-type.rb', line 19
def anchor_name card
card.type_name
end
|
.follow_label(name) ⇒ Object
27
28
29
|
# File 'tmpsets/set_pattern/102-type.rb', line 27
def follow_label name
%(all "#{name}s")
end
|
.label(name) ⇒ Object
~~ above autogenerated; below pulled from /Users/ethan/dev/wagn/gem/card/mod/core/set_pattern/03_type.rb ~~
7
8
9
|
# File 'tmpsets/set_pattern/102-type.rb', line 7
def label name
%(All "#{name}" cards)
end
|
.pattern_applies?(card) ⇒ Boolean
15
16
17
|
# File 'tmpsets/set_pattern/102-type.rb', line 15
def pattern_applies? card
!!card.type_id
end
|
.prototype_args(anchor) ⇒ Object
11
12
13
|
# File 'tmpsets/set_pattern/102-type.rb', line 11
def prototype_args anchor
{ type: anchor }
end
|
Instance Method Details
#lookup_module_list(modules_hash) ⇒ Object
172
173
174
175
|
# File 'lib/card/set_pattern.rb', line 172
def lookup_module_list modules_hash
lookup_key = module_key || inherited_key
modules_hash[lookup_key] if lookup_key
end
|