Class: TeamsIncomingClients::WeekdayClient

Inherits:
Client
  • Object
show all
Defined in:
lib/teams_incoming_clients/models/weekday_client.rb

Constant Summary

Constants included from Modules::ClientConfigure

Modules::ClientConfigure::VALID_CONFIG_KEYS

Instance Method Summary collapse

Methods inherited from Client

#initialize

Methods included from Modules::ClientConfigure

#configure

Constructor Details

This class inherits a constructor from TeamsIncomingClients::Client

Instance Method Details

#post(text) ⇒ PostResult

日本の平日であればメッセージを送信する

Examples:

client.post(“hello world”)

Parameters:

  • text (String)

    送信するメッセージ

Returns:



8
9
10
11
12
13
14
# File 'lib/teams_incoming_clients/models/weekday_client.rb', line 8

def post(text)
  if today.holiday_date?
    PostResult.new(false, :not_post, "Today is not weekday")
  else
    post_message(text)
  end
end