I hereby claim:
- I am rmcsharry on github.
- I am rmcsharry (https://keybase.io/rmcsharry) on keybase.
- I have a public key whose fingerprint is 1193 CC22 BA3A 5A22 BF57 D3AB D826 65AA 8271 F162
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| class Clump | |
| def initialize(spec:, input:) | |
| @spec = spec | |
| @possibilities = @input | |
| end | |
| def self.build(spec:, possibilities: []) | |
| descendants.detect { |klass| klass.match?(spec) }.new(spec: spec, input: possibilities).lines | |
| end |
| class Bob | |
| def reply_to(statement) | |
| public_send("reply_to_#{Statement.build(statement).class}".downcase.to_sym) | |
| rescue NoMethodError | |
| default_reply | |
| end | |
| def reply_to_silence | |
| "Fine. Be that way!" | |
| end |
| onFileChange(event){ | |
| let files = event.srcElement.files; | |
| this.selectedFile = files[0]; | |
| if (files && this.selectedFile) { | |
| let reader = new FileReader(); | |
| reader.onload = this._handleReaderLoaded.bind(this); | |
| reader.readAsBinaryString(this.selectedFile); | |
| } | |
| } |
| require 'faker' | |
| module FakingIt | |
| # GNU License - copy, use, change as you see fit, just keep this header in place please | |
| # | |
| # by Richard McSharry 2016 based on Matt Hutchinson's gist | |
| # see https://gist.github.com/matthutchinson/2654461 | |
| # | |
| # Built/Tested with Ruby 2.3.1 and Rails 5.0.1 | |
| # |