Class: Pindo::Command::Feishu::SendMessage
- Inherits:
-
Object
- Object
- Pindo::Command::Feishu::SendMessage
- Defined in:
- lib/pindo/command/feishu/send_message.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(options) ⇒ SendMessage
constructor
A new instance of SendMessage.
- #run ⇒ Object
Constructor Details
#initialize(options) ⇒ SendMessage
Returns a new instance of SendMessage.
16 17 18 19 20 21 22 |
# File 'lib/pindo/command/feishu/send_message.rb', line 16 def initialize() @options = @webhook_url = [:webhook_url] @message = [:message] @title = [:title] || "通知" @at_all = [:at_all] || false end |
Class Method Details
.run(options) ⇒ Object
12 13 14 |
# File 'lib/pindo/command/feishu/send_message.rb', line 12 def self.run() new().run end |
Instance Method Details
#run ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/pindo/command/feishu/send_message.rb', line 24 def run unless @webhook_url puts "错误:未提供飞书 webhook URL" return false end unless @message puts "错误:未提供消息内容" return false end end |