Integrating List of constant names into the if-statement to avoid creating read/write...
[smartthings-infrastructure.git] / Location / Phrase.groovy
index f9f30815b20eba3db632fa46ea1bfe27c04cdbb5..e64609640a0007fa26986f4988c25fad4d04a157 100644 (file)
@@ -2,14 +2,17 @@
 package Location
 
 class Phrase {
-       private LinkedHashMap Phrases
+       private phrases
        
        Phrase() {
-               this.Phrases = [id:0, label:"Good Morning!"]
+               this.phrases = [[id:0, label:"Good Night!"],[id:1, label:"Good Morning!"],
+                               [id:2, label:"Goodbye!"],[id:3, label:"I'm Back!"]]
        } 
        def getPhrases() {
-               return Phrases
+               return this.phrases
+       }
+       def execute(String phrase) {
+               println(phrase)
        }
 }
 
-