Class: Unm::Calendar
- Inherits:
-
Object
- Object
- Unm::Calendar
- Defined in:
- lib/unm.rb
Constant Summary collapse
- BaseUrl =
URI('http://unmevents.unm.edu/Eventlist.aspx')
- Formats =
["CSV", "ICAL", "XML"]
Instance Method Summary collapse
- #get ⇒ Object
-
#initialize(from_date, to_date, format = "CSV") ⇒ Calendar
constructor
A new instance of Calendar.
Constructor Details
#initialize(from_date, to_date, format = "CSV") ⇒ Calendar
Returns a new instance of Calendar.
11 12 13 14 |
# File 'lib/unm.rb', line 11 def initialize(from_date, to_date, format = "CSV") @from_date, @to_date = check_date(from_date, to_date) @format = check_format(format) end |
Instance Method Details
#get ⇒ Object
16 17 18 19 |
# File 'lib/unm.rb', line 16 def get build_params @calendar ||= HTTParty.get(@url).body end |