class ConsolidatedScreeningList::Source

Constants

SOURCES

Attributes

key[R]

Public Class Methods

[](key)
Alias for: find_by_key
all() click to toggle source
# File lib/consolidated_screening_list/source.rb, line 19
def all
  @all ||= SOURCES.map { |key, value| new(key) }
end
find_by_key(key) click to toggle source
# File lib/consolidated_screening_list/source.rb, line 23
def find_by_key(key)
  all.find { |source| source.key == key }
end
Also aliased as: []
find_by_name(name) click to toggle source
# File lib/consolidated_screening_list/source.rb, line 28
def find_by_name(name)
  all.find { |source| source.name == name }
end
keys() click to toggle source
# File lib/consolidated_screening_list/source.rb, line 32
def keys
  @keys ||= SOURCES.keys
end
new(key) click to toggle source
# File lib/consolidated_screening_list/source.rb, line 39
def initialize(key)
  @key = key
end

Public Instance Methods

inspect() click to toggle source
# File lib/consolidated_screening_list/source.rb, line 43
def inspect
  "#<ConsolidatedScreeningList::Source key=\"#{key}\" name=\"#{name}\">"
end
name() click to toggle source
# File lib/consolidated_screening_list/source.rb, line 47
def name
  SOURCES[key]
end