Given a computer object get the USB version of the computer's soundcard, and if it's null return UNKNOWN
class Computer {
private final Soundcard soundcard;
Computer(final Soundcard soundcard) {| /* | |
| * derivative work of Matheus de Oliveira's json_manipulator.sql | |
| * https://gist.github.com/matheusoliveira/9488951 | |
| * | |
| * adapted to support postgresql 9.4 jsonb type | |
| * no warranties or guarantees of any kind are implied or offered | |
| * | |
| * license is as Matheus conferred it on 4/9/2015: | |
| * matheusoliveira commented on Apr 9 | |
| * @hannes-landeholm, I'd like to take credit if you share them |
| http://www.dizzy.co.uk/cheatsheets | |
| This work is licensed under the Creative Commons | |
| Attribution-NonCommercial-NoDerivs 2.0 License. To | |
| view a copy of this license, visit | |
| http://creativecommons.org/licenses/by-nc-nd/2.0/uk | |
| ########## Shell Commands ########## | |
| Installation: | |
| $ gem install capistrano |
| after "deploy:symlink", "deploy:restart_workers" | |
| ## | |
| # Rake helper task. | |
| # http://pastie.org/255489 | |
| # http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
| # http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
| def run_remote_rake(rake_cmd) | |
| rake_args = ENV['RAKE_ARGS'].to_s.split(',') | |
| cmd = "cd #{fetch(:latest_release)} && #{fetch(:rake, "rake")} RAILS_ENV=#{fetch(:rails_env, "production")} #{rake_cmd}" |