Module: Card::Set::Type::Cardtype
- Extended by:
- Card::Set
- Includes:
- Basic
- Defined in:
- tmpsets/set/mod017-follow/type/cardtype.rb,
tmpsets/set/mod021-standard/type/cardtype.rb
Overview
Set: All “Cardtype” cards
Defined Under Namespace
Modules: HtmlFormat
Class Method Summary collapse
Instance Method Summary collapse
-
#cards_of_type_exist? ⇒ Boolean
-
#create_ok? ⇒ Boolean
-
#follow_label ⇒ Object
-
#follow_set_card ⇒ Object
-
#followed_by?(user_id = nil) ⇒ Boolean
-
#list_direct_followers? ⇒ Boolean
-
#wql_hash ⇒ Object
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, #underscore
Methods included from AdvancedApi
#attachment, #ensure_set, #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 Basket
#abstract_basket, #add_to_basket, #basket, #unshift_basket
Methods included from Card::Set::Trait
#card_accessor, #card_reader, #card_writer, #require_field
Methods included from Event::Api
Class Method Details
.source_location ⇒ Object
7 |
# File 'tmpsets/set/mod017-follow/type/cardtype.rb', line 7 def self.source_location; "/Users/ethan/dev/decko/gem/card/mod/follow/set/type/cardtype.rb"; end |
Instance Method Details
#cards_of_type_exist? ⇒ Boolean
82 83 84 |
# File 'tmpsets/set/mod021-standard/type/cardtype.rb', line 82 def cards_of_type_exist? !new_card? && Card.where(trash: false, type_id: id).exists? end |
#create_ok? ⇒ Boolean
86 87 88 |
# File 'tmpsets/set/mod021-standard/type/cardtype.rb', line 86 def create_ok? Card.new(type_id: id).ok? :create end |
#follow_label ⇒ Object
8 9 10 |
# File 'tmpsets/set/mod017-follow/type/cardtype.rb', line 8 def follow_label follow_set_card.follow_label end |
#follow_set_card ⇒ Object
16 17 18 |
# File 'tmpsets/set/mod017-follow/type/cardtype.rb', line 16 def follow_set_card Card.fetch name, :type end |
#followed_by?(user_id = nil) ⇒ Boolean
12 13 14 |
# File 'tmpsets/set/mod017-follow/type/cardtype.rb', line 12 def followed_by? user_id=nil follow_set_card.all_members_followed_by? user_id end |
#list_direct_followers? ⇒ Boolean
20 21 22 |
# File 'tmpsets/set/mod017-follow/type/cardtype.rb', line 20 def list_direct_followers? true end |
#wql_hash ⇒ Object
10 11 12 |
# File 'tmpsets/set/mod021-standard/type/cardtype.rb', line 10 def wql_hash { type_id: id, sort: :name } end |