Class: DComm::CLI::Command
- Inherits:
-
Dry::CLI::Command
- Object
- Dry::CLI::Command
- DComm::CLI::Command
- Defined in:
- lib/dcomm/cli/command.rb
Direct Known Subclasses
Apply, Create, Delete, Edit, Guild::Apply, Guild::Create, Guild::Delete, Guild::Edit, Guild::List, Guild::Show, Guild::Update, List, Show, Update
Instance Attribute Summary collapse
-
#discord ⇒ Object
readonly
Returns the value of attribute discord.
-
#renderer ⇒ Object
readonly
Returns the value of attribute renderer.
Instance Method Summary collapse
-
#initialize(discord: nil, renderer: nil) ⇒ Command
constructor
rubocop:disable Lint/MissingSuper.
Constructor Details
#initialize(discord: nil, renderer: nil) ⇒ Command
rubocop:disable Lint/MissingSuper
12 13 14 15 16 17 18 19 20 |
# File 'lib/dcomm/cli/command.rb', line 12 def initialize(discord: nil, renderer: nil) # rubocop:disable Lint/MissingSuper require 'dcomm/config' @discord = discord || DiscordAPI.new( auth_header: "Bot #{DComm.config.discord_bot_token}", ) @renderer = renderer || Renderer.new end |
Instance Attribute Details
#discord ⇒ Object (readonly)
Returns the value of attribute discord.
10 11 12 |
# File 'lib/dcomm/cli/command.rb', line 10 def discord @discord end |
#renderer ⇒ Object (readonly)
Returns the value of attribute renderer.
10 11 12 |
# File 'lib/dcomm/cli/command.rb', line 10 def renderer @renderer end |