lib/device_cloud/configuration.rb in device_cloud-0.2.0 vs lib/device_cloud/configuration.rb in device_cloud-0.2.1
- old
+ new
@@ -58,9 +58,24 @@
# end
def configure
yield self
end
+ def config
+ {
+ username: username,
+ password: password,
+ root_url: root_url,
+ alert_notification_handler: @alert_notification_handler,
+ empty_alert_notification_handler: @empty_alert_notification_handler,
+ data_notification_handler: @data_notification_handler,
+ empty_data_notification_handler: @empty_data_notification_handler,
+ event_notification_handler: @event_notification_handler,
+ empty_event_notification_handler: @empty_event_notification_handler,
+ logger: logger
+ }.freeze
+ end
+
# DeviceCloud url
#
# @return the DeviceCloud url or the default of 'https://my.idigi.com' if not set.
def root_url
@root_url ||= 'https://my.idigi.com'
\ No newline at end of file