Module: Card::FollowOption
- Included in:
- Set::Self::Always, Set::Self::Created, Set::Self::Edited, Set::Self::Never
- Defined in:
- mod/notifications/lib/card/follow_option.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- @@test =
{}
- @@follower_candidate_ids =
{}
- @@options =
{ all: [], main: [], restrictive: [] }
Class Method Summary collapse
- .cards ⇒ Object
- .codenames(type = :all) ⇒ Object
- .included(host_class) ⇒ Object
- .main_options ⇒ Object
- .restrictive_options ⇒ Object
Instance Method Summary collapse
Class Method Details
.cards ⇒ Object
19 20 21 |
# File 'mod/notifications/lib/card/follow_option.rb', line 19 def self.cards codenames.map { |codename| Card[codename] } end |
.codenames(type = :all) ⇒ Object
15 16 17 |
# File 'mod/notifications/lib/card/follow_option.rb', line 15 def self.codenames type=:all @@options[type] end |
.included(host_class) ⇒ Object
11 12 13 |
# File 'mod/notifications/lib/card/follow_option.rb', line 11 def self.included host_class host_class.extend ClassMethods end |
.main_options ⇒ Object
27 28 29 |
# File 'mod/notifications/lib/card/follow_option.rb', line 27 def self. codenames :main end |
.restrictive_options ⇒ Object
23 24 25 |
# File 'mod/notifications/lib/card/follow_option.rb', line 23 def self. codenames :restrictive end |
Instance Method Details
#description(set_card) ⇒ Object
35 36 37 |
# File 'mod/notifications/lib/card/follow_option.rb', line 35 def description set_card set_card.follow_label end |
#restrictive_option? ⇒ Boolean
31 32 33 |
# File 'mod/notifications/lib/card/follow_option.rb', line 31 def restrictive_option? Card::FollowOption..include? codename end |