This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def play(*arguments) | |
result = true | |
arguments.each do |argument| | |
case argument | |
when Hash | |
value = argument.delete(:value) | |
play_ssml_for(value, argument) | |
when RubySpeech::SSML::Speak | |
play_ssml argument | |
else |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class DrupalClass { | |
static $instances = array(); | |
public function __construct() | |
{ | |
$class = get_class($this); | |
if (isset(self::$instances[$class])) return; |