Module: Card::FollowOption

Defined in:
lib/card/follow_option.rb

Overview

module to be included in cards used as options for follow rules

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.follower_candidate_idsObject (readonly)

Returns the value of attribute follower_candidate_ids.



14
15
16
# File 'lib/card/follow_option.rb', line 14

def follower_candidate_ids
  @follower_candidate_ids
end

.optionsObject (readonly)

Returns the value of attribute options.



14
15
16
# File 'lib/card/follow_option.rb', line 14

def options
  @options
end

.testObject (readonly)

Returns the value of attribute test.



14
15
16
# File 'lib/card/follow_option.rb', line 14

def test
  @test
end

Class Method Details

.cardsObject



20
21
22
# File 'lib/card/follow_option.rb', line 20

def cards
  codenames.map { |codename| Card[codename] }
end

.codenames(type = :all) ⇒ Object



16
17
18
# File 'lib/card/follow_option.rb', line 16

def codenames type=:all
  options[type]
end

.main_optionsObject



28
29
30
# File 'lib/card/follow_option.rb', line 28

def main_options
  codenames :main
end

.restrictive_optionsObject



24
25
26
# File 'lib/card/follow_option.rb', line 24

def restrictive_options
  codenames :restrictive
end