-
-
Save radar/d2f931b51a7231e5cc1d22550a117eef to your computer and use it in GitHub Desktop.
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
class QueryRepository | |
def initialize | |
@queries = { | |
"Do a query" => "Some Query", | |
"Do a random query" => "Random Query", | |
"I want rowid 10" => "Query Random Table for rowid 23", | |
"Eff off" => "This does nothing" | |
} | |
end | |
def get_labels | |
@queries.keys | |
end | |
def valid_key?(key) | |
@queries.key?(key) | |
end | |
def get_query(key) | |
@queries.key?(key) ? @queries[key] : nil | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment