Run the example.
$ ruby pipes.rb
FOO
BAR
$
port module Chat exposing (main) | |
-- https://github.com/elm-lang/core/issues/703 | |
import Json.Decode | |
import WebSocket | |
port messages : List String -> Cmd msg |
Run the example.
$ ruby pipes.rb
FOO
BAR
$
returns = ->(type) { | |
->(func) { | |
->(*args) { | |
func.(*args).tap { |result| | |
raise ArgumentError unless result.is_a?(type) | |
} | |
} | |
} | |
} |
RSpec.describe "lolrubby" do | |
def lol | |
wat = "haha", | |
wat.upcase | |
end | |
it "is silly sometimes" do | |
expect(lol).to eq("HAHA") # fails... lol | |
end | |
end |
koan "New processes are spawned functions" do | |
value = spawn(fn -> nil end) | |
assert is_pid(value) == true | |
end | |
koan "Processes die when their function exits" do | |
pid = spawn(fn -> nil end) | |
# The spawned function executes concurrently with the current process. So |
source "https://rubygems.org" | |
gem "activerecord"#, "4.2.7.1" | |
gem "sqlite3" |
source "https://rubygems.org" | |
gem "sqlite3" | |
gem "activerecord" | |
gem "rspec" |
# https://www.reddit.com/r/osx/comments/52zn5r/difficulties_with_sshagent_in_macos_sierra/ | |
Host * | |
UseKeychain yes |
I hereby claim:
To claim this, I am signing this object:
class Object | |
def extract(*messages) | |
messages.map(&method(:public_send)) | |
end | |
end | |
RSpec.describe Object do | |
Foo = Struct.new(:bar, :baz) | |
describe "#extract" do |