Module: DeviceCloud::Configuration
- Included in:
- DeviceCloud
- Defined in:
- lib/device_cloud/configuration.rb
Instance Attribute Summary collapse
-
#alert_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::AlertNotification objects Proc will be called with the alert notification object.
-
#data_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::DataNotification objects Proc will be called with the data notification object.
-
#event_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::EventNotification objects Proc will be called with the event notification object.
-
#logger ⇒ Object
DeviceCloud logger.
-
#password ⇒ Object
DeviceCloud password.
-
#root_url ⇒ Object
DeviceCloud url.
-
#username ⇒ Object
DeviceCloud username.
Instance Method Summary collapse
-
#configure {|_self| ... } ⇒ Object
Yield self to be able to configure ActivityFeed with block-style configuration.
Instance Attribute Details
#alert_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::AlertNotification objects Proc will be called with the alert notification object
26 27 28 |
# File 'lib/device_cloud/configuration.rb', line 26 def alert_notification_handler @alert_notification_handler end |
#data_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::DataNotification objects Proc will be called with the data notification object
31 32 33 |
# File 'lib/device_cloud/configuration.rb', line 31 def data_notification_handler @data_notification_handler end |
#event_notification_handler ⇒ Object
Proc that will be called for handling DeviceCloud::PushNotification::EventNotification objects Proc will be called with the event notification object
21 22 23 |
# File 'lib/device_cloud/configuration.rb', line 21 def event_notification_handler @event_notification_handler end |
#logger ⇒ Object
DeviceCloud logger
72 73 74 |
# File 'lib/device_cloud/configuration.rb', line 72 def logger @logger ||= Logger.new(STDOUT) end |
#password ⇒ Object
DeviceCloud password
64 65 66 67 |
# File 'lib/device_cloud/configuration.rb', line 64 def password raise 'DeviceCloud password is blank' if @password.blank? @password end |
#root_url ⇒ Object
DeviceCloud url
49 50 51 |
# File 'lib/device_cloud/configuration.rb', line 49 def root_url @root_url ||= 'https://my.idigi.com' end |
#username ⇒ Object
DeviceCloud username
56 57 58 59 |
# File 'lib/device_cloud/configuration.rb', line 56 def username raise 'DeviceCloud username is blank' if @username.blank? @username end |
Instance Method Details
#configure {|_self| ... } ⇒ Object
Yield self to be able to configure ActivityFeed with block-style configuration.
Example:
ActivityFeed.configure do |configuration|
configuration.root_url = 'https://example.com'
end
42 43 44 |
# File 'lib/device_cloud/configuration.rb', line 42 def configure yield self end |