Here's the [documentation].
Let's say we have this:
class Image
belongs_to :user
end
class @Hello | |
constructor: -> | |
@greeting = "hello" | |
greet: => | |
console.log @greeting | |
print_number: -> | |
number = 3 | |
console.log "#{number} is a number" |
postfix operator ^^ {} | |
// `inout` means that you can't do `let l = [1]` then `l ^^` -- `l` must be a `var` | |
postfix func ^^<T>(inout array: [T]) -> [T] { | |
return [newArray.removeLast(), newArray.removeLast()] | |
} |
# Uses an algorithm originally developed by Gordon Fontenot: https://twitter.com/GFontenot/status/560984177672482817 | |
# Translated into Ruby by Gabe Berke-Williams, 2015 | |
Yam = String | |
class YamParser | |
def self.fromYam(yam) | |
"It's a fucking sweet potato" | |
end | |
end |
it "returns a list of available cities" do | |
create(:city, name: "Boston") | |
get_index | |
expect(json_body).to eq({ cities: %w(Boston) }) | |
end | |
def get_index | |
get "/api/cities", {}.to_json, default_headers.merge("HTTP_AUTHORIZATION" => token_header_value, "Authorization" => token_header_value) |
require 'socket' | |
# Use your INTERNAL ip | |
me = { ip: '192.168.1.205', port: 55_555, name: 'Gabe' } | |
# Use your friend's EXTERNAL ip | |
friend = { ip: '50.187.42.170', port: 5_555, name: 'Edward' } | |
BasicSocket.do_not_reverse_lookup = true |
Go to the main pull request URL. It should end in /pull/NUMBER
. Look at the
3 tabs right under the PR title. You should be in the "Conversation" view.
Read the PR title and the PR description. The description should tell you what the developer is trying to accomplish in this PR. This gives you some mental structure so you know what you're looking at. It can also tell you what doesn't belong in this PR.
module ModuleOne | |
def name | |
"Module 1" | |
end | |
end | |
module ModuleTwo | |
def name | |
"Module 2" | |
end |