Class: HolidaysFromGoogleCalendar::Configuration
- Inherits:
-
Object
- Object
- HolidaysFromGoogleCalendar::Configuration
- Defined in:
- lib/holidays_from_google_calendar/configuration.rb
Constant Summary collapse
- DEFAULT_CACHE_SIZE =
1_000
Instance Attribute Summary collapse
-
#cache ⇒ Object
Returns the value of attribute cache.
-
#calendar ⇒ Object
Returns the value of attribute calendar.
-
#credential ⇒ Object
Returns the value of attribute credential.
-
#preload ⇒ Object
Returns the value of attribute preload.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#cache ⇒ Object
Returns the value of attribute cache.
5 6 7 |
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5 def cache @cache end |
#calendar ⇒ Object
Returns the value of attribute calendar.
5 6 7 |
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5 def calendar @calendar end |
#credential ⇒ Object
Returns the value of attribute credential.
5 6 7 |
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5 def credential @credential end |
#preload ⇒ Object
Returns the value of attribute preload.
5 6 7 |
# File 'lib/holidays_from_google_calendar/configuration.rb', line 5 def preload @preload end |