I hereby claim:
- I am crimsonknave on github.
- I am crimsonknave (https://keybase.io/crimsonknave) on keybase.
- I have a public key whose fingerprint is 4C19 2860 9F42 931C 06D8 5B85 4406 5D8D BD2E 4BEC
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def parse_options(opts) | |
parsed = {} | |
opts.each do |option| | |
parsed.merge! option_handlers[option].call option | |
end | |
parsed | |
end | |
def option_handlers | |
{ |
def example(&block) | |
puts 'before we call the block' | |
yield | |
puts 'after we call the block' | |
end | |
example do | |
puts 'foo' | |
end |
/\v\@log\.\w+\(.*\)( if \@log)@!$ | |
class JsonSpec::Matchers::BeJsonEql | |
def description | |
"be equal to #{@expected}#{" at path #{@path}" if @path}" | |
end | |
end | |
class JsonSpec::Matchers::HaveJsonPath | |
def description | |
"have json path #{@path}" | |
end | |
end |
# Jruby not running in 1.9 mode squashes hashes, ruby doesn't so we'll do a bit of unsquashing for those in jruby land | |
my_hash = {1 => 2, 3 => "asdf", 4 => :whee} | |
# In jruby you would get | |
# puts my_hash | |
# 123asdf4whee | |
# with this you get | |
# {1 => 2, 3 => "asdf", 4 => "whee"} |