Module: Card::FollowOption

Included in:
Set::Self::Always, Set::Self::Created, Set::Self::Edited, Set::Self::Never
Defined in:
mod/05_email/lib/card/follow_option.rb

Defined Under Namespace

Modules: ClassMethods

Constant Summary collapse

@@options =
{ :all=>[], :main=>[], :restrictive=>[] }

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cardsObject



19
20
21
# File 'mod/05_email/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/05_email/lib/card/follow_option.rb', line 15

def self.codenames type=:all
  @@options[type]
end

.included(host_class) ⇒ Object



11
12
13
# File 'mod/05_email/lib/card/follow_option.rb', line 11

def self.included(host_class)     
   host_class.extend ClassMethods
end

.main_optionsObject



27
28
29
# File 'mod/05_email/lib/card/follow_option.rb', line 27

def self.main_options
  self.codenames :main
end

.restrictive_optionsObject



23
24
25
# File 'mod/05_email/lib/card/follow_option.rb', line 23

def self.restrictive_options
  self.codenames :restrictive
end

Instance Method Details

#description(set_card) ⇒ Object



35
36
37
# File 'mod/05_email/lib/card/follow_option.rb', line 35

def description set_card
  set_card.follow_label
end

#restrictive_option?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'mod/05_email/lib/card/follow_option.rb', line 31

def restrictive_option?
  Card::FollowOption.restrictive_options.include? codename
end