Class: Nanobot::Config::ChannelsConfig
- Inherits:
-
Struct
- Object
- Struct
- Nanobot::Config::ChannelsConfig
- Defined in:
- lib/nanobot/config/schema.rb
Overview
Collection of all messaging channel configurations
Instance Attribute Summary collapse
-
#discord ⇒ Object
Returns the value of attribute discord.
-
#email ⇒ Object
Returns the value of attribute email.
-
#gateway ⇒ Object
Returns the value of attribute gateway.
-
#slack ⇒ Object
Returns the value of attribute slack.
-
#telegram ⇒ Object
Returns the value of attribute telegram.
Instance Method Summary collapse
-
#initialize(telegram: {}, discord: {}, gateway: {}, slack: {}, email: {}) ⇒ ChannelsConfig
constructor
A new instance of ChannelsConfig.
Constructor Details
#initialize(telegram: {}, discord: {}, gateway: {}, slack: {}, email: {}) ⇒ ChannelsConfig
Returns a new instance of ChannelsConfig.
239 240 241 242 243 244 245 246 247 |
# File 'lib/nanobot/config/schema.rb', line 239 def initialize(telegram: {}, discord: {}, gateway: {}, slack: {}, email: {}) super( telegram: TelegramConfig.new(**(telegram.is_a?(Hash) ? telegram : {})), discord: DiscordConfig.new(**(discord.is_a?(Hash) ? discord : {})), gateway: GatewayConfig.new(**(gateway.is_a?(Hash) ? gateway : {})), slack: SlackConfig.new(**(slack.is_a?(Hash) ? slack : {})), email: EmailConfig.new(**(email.is_a?(Hash) ? email : {})) ) end |
Instance Attribute Details
#discord ⇒ Object
Returns the value of attribute discord
233 234 235 |
# File 'lib/nanobot/config/schema.rb', line 233 def discord @discord end |
#email ⇒ Object
Returns the value of attribute email
233 234 235 |
# File 'lib/nanobot/config/schema.rb', line 233 def email @email end |
#gateway ⇒ Object
Returns the value of attribute gateway
233 234 235 |
# File 'lib/nanobot/config/schema.rb', line 233 def gateway @gateway end |
#slack ⇒ Object
Returns the value of attribute slack
233 234 235 |
# File 'lib/nanobot/config/schema.rb', line 233 def slack @slack end |
#telegram ⇒ Object
Returns the value of attribute telegram
233 234 235 |
# File 'lib/nanobot/config/schema.rb', line 233 def telegram @telegram end |