0
好的,這裏是我的配置部分:它從.siriproxy文件夾中的config.yml文件中提取變量。SiriProxy重置配置變量
def initialize(config)
@hs_host = config["hs_host"]
@speak_response = config["speak_response"]
末
現在我想打一個聽命令可以改變@speak_response變量,並使其可用於任何其它的RB文件聽命令。
對於instace命令,當我說「turn speak off」時,將@speak_response設置爲「off」。 我知道如何在listen命令中執行此操作,但不知道如何設置,因此在整個rb文件中爲任何listen命令設置了speak_response。