Class: HolidayList::Params
- Inherits:
-
Object
- Object
- HolidayList::Params
- Defined in:
- lib/holiday_list/params.rb
Overview
Params: Munges google calendar api request parameters
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
Instance Method Summary collapse
-
#initialize(key, time_options = {}) ⇒ Params
constructor
A new instance of Params.
- #params_hash ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(key, time_options = {}) ⇒ Params
Returns a new instance of Params.
10 11 12 13 14 15 |
# File 'lib/holiday_list/params.rb', line 10 def initialize(key, = {}) @key = key = end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
8 9 10 |
# File 'lib/holiday_list/params.rb', line 8 def key @key end |
Instance Method Details
#params_hash ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/holiday_list/params.rb', line 21 def params_hash { key: key, orderBy: order_by, singleEvents: single_events, timeMin: time_min, timeMax: time_max } end |
#to_s ⇒ Object
17 18 19 |
# File 'lib/holiday_list/params.rb', line 17 def to_s params_hash.to_query end |