Module: SiriCal::ClassMethods
- Defined in:
- lib/siri_cal/methods.rb
Instance Method Summary collapse
-
#siriable(options = {}) ⇒ Object
Public: Initialize a Siriable object.
Instance Method Details
#siriable(options = {}) ⇒ Object
Public: Initialize a Siriable object.
options - The Hash options used to redefine the config (default: {}):
:login - The Symbol login field to sign in with (default: :login).
:password - The Symbol login field to sign in with (default: :password).
Examples
siriable :login => :caldav_login, :password => :caldav_password
Returns nothing.
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/siri_cal/methods.rb', line 18 def siriable ={} config = {} config[:login] = .delete(:login) || :siriable_login config[:password] = .delete(:password) || :siriable_password config.each do |key, value| define_method "siri_cal_#{key}" do self.send(value) end end end |