Class: GdsApi::Calendars

Inherits:
Base
  • Object
show all
Defined in:
lib/gds_api/calendars.rb

Instance Attribute Summary

Attributes inherited from Base

#options

Instance Method Summary collapse

Methods inherited from Base

#client, #create_client, #get_list, #initialize, #url_for_slug

Constructor Details

This class inherits a constructor from GdsApi::Base

Instance Method Details

#bank_holidays(division = nil) ⇒ Object



4
5
6
7
8
9
# File 'lib/gds_api/calendars.rb', line 4

def bank_holidays(division = nil)
  json_url = "#{endpoint}/bank-holidays"
  json_url += "/#{division.to_s.tr('_', '-')}" unless division.nil?
  json_url += ".json"
  get_json json_url
end