Class: Expire::RuleList

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/expire/rule_list.rb

Overview

List rule classes, names and option-names

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.class_namesObject



8
9
10
# File 'lib/expire/rule_list.rb', line 8

def self.class_names
  instance.class_names
end

.name_symbolsObject



16
17
18
# File 'lib/expire/rule_list.rb', line 16

def self.name_symbols
  instance.name_symbols
end

.namesObject



12
13
14
# File 'lib/expire/rule_list.rb', line 12

def self.names
  instance.names
end

.option_namesObject



20
21
22
# File 'lib/expire/rule_list.rb', line 20

def self.option_names
  instance.option_names
end

Instance Method Details

#class_namesObject



24
25
26
# File 'lib/expire/rule_list.rb', line 24

def class_names
  @class_names ||= rule_classes.map(&:to_s).freeze
end

#name_symbolsObject



32
33
34
# File 'lib/expire/rule_list.rb', line 32

def name_symbols
  names.map(&:to_sym)
end

#namesObject



28
29
30
# File 'lib/expire/rule_list.rb', line 28

def names
  rule_classes.map(&:name)
end

#option_namesObject



36
37
38
# File 'lib/expire/rule_list.rb', line 36

def option_names
  rule_classes.map(&:option_name)
end