Class: HolidaysFromGoogleCalendar::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/holidays_from_google_calendar/configuration.rb

Constant Summary collapse

DEFAULT_CACHE_SIZE =
1_000

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/holidays_from_google_calendar/configuration.rb', line 7

def initialize
  @calendar = {
    nation: "japanese",
    language: "en"
  }

  @cache = {
    enable: true,
    max_size: DEFAULT_CACHE_SIZE
  }

  @preload = {
    enable: true, # Require cache enabled
    date_range: 1.year
  }
end

Instance Attribute Details

#cacheObject

Returns the value of attribute cache.



5
6
7
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5

def cache
  @cache
end

#calendarObject

Returns the value of attribute calendar.



5
6
7
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5

def calendar
  @calendar
end

#credentialObject

Returns the value of attribute credential.



5
6
7
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5

def credential
  @credential
end

#preloadObject

Returns the value of attribute preload.



5
6
7
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5

def preload
  @preload
end