Class: ScheduleScraper::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/schedule-scraper/config.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.typesObject

Returns the value of attribute types.



4
5
6
# File 'lib/schedule-scraper/config.rb', line 4

def types
  @types
end

Class Method Details

.register_type(klass) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/schedule-scraper/config.rb', line 7

def self.register_type(klass)
  @types = {} unless @types

  key = klass.to_s.downcase.split("::")[1].to_sym

  @types[key] = klass
end