require 'line/bot'
class AlarmServicc
def client
@client ||= Line::Bot::Client.new do |config|
config.channel_secret = 'XXX'
config.channel_token = 'XXX'
end
end
def run
message = {
type: "text",
text: "現在時間:#{Time.current} 趕快起床吧"
}
client.push_message('XXX', message)
end
end
顯示uninitialized constant AlarmService (NameError),這段程式碼是按照https://ithelp.ithome.com.tw/articles/10201597 的步驟執行,請問程式碼哪邊需要修正的嗎?